protected void bindGrid() { objTESTDataContext = new TESTDataContext(); List <TEST2> lstData = objTESTDataContext.TEST2s.Where(t => t.Is_Active == true).ToList(); GridView1.DataSource = lstData; GridView1.DataBind(); }
public static int AddProgram(TEST2 objTEST2) { TESTDataContext objTESTDataContext = new TESTDataContext(); objTESTDataContext.TEST2s.InsertOnSubmit(objTEST2); objTESTDataContext.SubmitChanges(); return(0); }