protected void btnDelete_Click(object sender, EventArgs e) { EmployeTbl empTbl = db.EmployeTbls.Single(em => em.empId == Convert.ToInt32(txtId.Text)); db.EmployeTbls.DeleteOnSubmit(empTbl); db.SubmitChanges(); ShowGrid(); }
protected void btnUpdate_Click(object sender, EventArgs e) { EmployeTbl empTbl = db.EmployeTbls.Single(em => em.empId == Convert.ToInt32(txtId.Text)); empTbl.empName = txtName.Text; empTbl.empSal = Convert.ToSingle(TxtSalary.Text); db.SubmitChanges(); ShowGrid(); }
protected void btnInsert_Click(object sender, EventArgs e) { EmployeTbl emp = new EmployeTbl(); emp.empName = txtName.Text; emp.empSal = Convert.ToSingle(TxtSalary.Text); db.GetTable <EmployeTbl>().InsertOnSubmit(emp); db.SubmitChanges(); ShowGrid(); }
partial void DeleteEmployeTbl(EmployeTbl instance);
partial void UpdateEmployeTbl(EmployeTbl instance);
partial void InsertEmployeTbl(EmployeTbl instance);