Esempio n. 1
0
        private bool Update(StudentDB database)
        {
            bool result = true;

            try
            {
                database.Command.Parameters.Clear();
                database.Command.CommandType = System.Data.CommandType.StoredProcedure;
                database.Command.CommandText = "tblStudent_UPDATE";
                database.Command.Parameters.Add("@FNAME", SqlDbType.VarChar).Value = _FNAME;
                database.Command.Parameters.Add("@LNAME", SqlDbType.VarChar).Value = _LNAME;

                base.Initialize(database, base.id);
                database.ExecuteEQueryWithTransaction();
                base.Initialize(database.Command);
            }
            catch (Exception e)
            {
                result = false;
                throw e;
            }
            return(result);
        }