Wednesday, November 5, 2008

Joins in LINQ


Using a Simple Join in LINQ:

 RekabuDataContext RKdb = new RekabuDataContext();

protected void Page_Load(object sender, EventArgs e)
    {
     
        BindGridView();
       
    }

public void BindGridView()
    {
        var q = from records in RKdb.Tests
                from recordsnew in RKdb.Images
                where records.id == recordsnew.id
                select recordsnew;
        gvRekabu.DataSource = q;
        gvRekabu.DataBind();
    }


Assigning Custom Columns header in LINQ:

public void Bind()
    {

        var q = from fields in RKdb.Tests
                where (fields.salary >= 20000)

                select new
                {
                    CandidateName = fields.Name,
                    CandidateLocation = fields.Loaction,
                    CandidateSalary = fields.salary,

                }
                ;

        gvRekabu.DataSource = q;
        gvRekabu.DataBind();
    
    }


Thanks,
Nitin Sharma

Tuesday, November 4, 2008

Tulsi Vivah on November 10,2008

Tulsi Vivah

The tulsi plant is held sacred by the Hindus as it is regarded as an incarnation of Mahalaxmi who was born as Vrinda. The festival of Tulsi Vivah is celebrated in each and every household of Goa. The one special feature of the festival is that of preparing various delicious sweet dishes at home. The women folk engage themselves in preparations well in advance. A typical Goan ojhe (load of sweets) is sent to the daughter from her parental home along with jodi (cotton threads used to light lamp while performing aarti). 

Tulsi was married to demon king Jalandhar. But she prayed to Lord Vishnu that her demon husband would be protected, with the result that no god was able to harm him. However on the request of the other gods, Lord Vishnu took the form of Jalandhar and stayed with the unsuspecting Tulsi. When the truth emerged after Jalandhar's death, Vrinda crused Vishnu and turned him to stone (Shaligram) and collapsed. From her body emerged the tulsi plant. That is why Vishnu pooja is considered incomplete without tulsi leaves. Tulsi vivah is celebrated on the next day of Kartiki Akadashi. On this day tulsi is married to Shaligram. 

On this day tulsivrindavan is coloured and decorated as a bride. Sugarcane and branches of tamarind and amla trees are planted along with the tulsi plant. Only vegetarian food is cooked on this day. At midday, a full meal consisting of rice, moongachi gathi, puri , sweet potato kheer , red pumpkin vegetable cooked with pieces of sugarcane, amla and tamarind is offered to Tulsi Vrindavan. Tulsi vivah ceremony takes place in the late evening. Various poha dishes are offered to Lord Vishnu. Then prasad is distributed among family members and friends.


Thanks,
Nitin Sharma