Ejemplo n.º 1
0
        public int InsertData(StudentDetailsData data)
        {
            DbHandiler.DbHandiler DbHandle = new DbHandiler.DbHandiler();

            string sql = @"insert into student_data (SUBJECT1,SUBJECT2,ADDRESS,MARKS1,MARKS2,NAME,CLASS,AGE,SEX,UID) VALUES (@SUBJECT1,@SUBJECT2,@ADDRESS,@MARKS1,@MARKS2,@NAME,@CLASS,@AGE,@SEX,@UID);";

            return(DbHandle.SaveData <StudentDetailsData>(sql, data));
        }
Ejemplo n.º 2
0
        public object UpdateToDb(StudentDetailsData data)
        {
            DbHandiler.DbHandiler DbHandle = new DbHandiler.DbHandiler();

            string sql = @"UPDATE student_data SET SUBJECT1 = @SUBJECT1,SUBJECT2 = @SUBJECT2,ADDRESS = @ADDRESS ,MARKS1 = @MARKS1, 
                           MARKS2 = @MARKS2,NAME = @NAME,CLASS = @CLASS ,AGE = @AGE,SEX = @SEX,UID = @UID
                           where ID = @ID ";

            return(DbHandle.SaveData <StudentDetailsData>(sql, data));
        }