Esempio n. 1
0
        public int DelelteItemByID()
        {
            string sql = string.Format("delete from tblStudents where ID={0}",
                                       emp.empId);

            return(ProjectDB.ExcuteNonQuery(sql));
        }
Esempio n. 2
0
        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));
        }
Esempio n. 3
0
        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));
        }