Пример #1
0
 public string Delete(DTONCC data)
 {
     try
     {
         DAONCC daoUnit = new DAONCC();
         return(daoUnit.Delete(data));
     }
     catch (Exception e)
     {
         return("Lỗi ngoại lệ: BUSUnit -> Delete: " + e.Message);
     }
 }
Пример #2
0
 public string CheckedAll()
 {
     try
     {
         DAONCC daoUnit = new DAONCC();
         return(daoUnit.CheckedAll());
     }
     catch (Exception e)
     {
         return("Lỗi ngoại lệ: BUSUnit -> Delete: " + e.Message);
     }
 }
Пример #3
0
        public string Insert(ref DTONCC data)
        {
            try
            {
                DAONCC daoUnit = new DAONCC();

                return(daoUnit.Insert(ref data));
            }
            catch (Exception e)
            {
                return(@"Lỗi ngoại lệ : BUSUnit -> Insert : " + e.Message);
            }
        }
Пример #4
0
 public string GetAll(ref DataTable data)
 {
     try
     {
         DAONCC daoUnit = new DAONCC();
         string result  = daoUnit.GetAll(ref data);
         if (result == "SUCCESS")
         {
             if (data != null && data.Rows.Count > 0)
             {
                 data.Columns.Add("RANKINDEX", typeof(int));
                 for (int i = 0; i < data.Rows.Count; i++)
                 {
                     data.Rows[i]["RANKINDEX"] = i + 1;
                 }
             }
         }
         return(result);
     }
     catch (Exception e)
     {
         return(@"Lỗi ngoại lệ : BUSUnit ->GetAll : " + e.Message);
     }
 }