public int DelelteItemByID() { string sql = string.Format("delete from tblStudents where ID={0}", emp.empId); return(ProjectDB.ExcuteNonQuery(sql)); }
public int AddNewItem() { string sql = string.Format("insert into tblStudents (Name,Gender,TotalMarks) values ('{0}',{1},{2})", emp.Name, emp.Gender, emp.Marks); return(ProjectDB.ExcuteNonQuery(sql)); }
public int UpdateItemByID(int id) { string sql = string.Format("update tblStudents set Name='{0}', Gender='{1}', TotalMarks={2} where ID={3}", emp.Name, emp.Gender, emp.Marks, id); return(ProjectDB.ExcuteNonQuery(sql)); }