Exemple #1
0
 public string Insert(ref DTOUnit data)
 {
     try
     {
         DAOUnit daoUnit = new DAOUnit();
         return(daoUnit.Insert(ref data));
     }
     catch (Exception e)
     {
         return(@"Lỗi ngoại lệ : BUSUnit -> Insert : " + e.Message);
     }
 }
Exemple #2
0
 public string Delete(DTOUnit data)
 {
     try
     {
         DAOUnit daoUnit = new DAOUnit();
         return(daoUnit.Delete(data));
     }
     catch (Exception e)
     {
         return("Lỗi ngoại lệ: BUSUnit -> Delete: " + e.Message);
     }
 }
Exemple #3
0
 public string CheckedAll()
 {
     try
     {
         DAOUnit daoUnit = new DAOUnit();
         return(daoUnit.CheckedAll());
     }
     catch (Exception e)
     {
         return("Lỗi ngoại lệ: BUSUnit -> Delete: " + e.Message);
     }
 }
Exemple #4
0
 public string GetAll(ref DataTable data)
 {
     try
     {
         DAOUnit daoUnit = new DAOUnit();
         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);
     }
 }
Exemple #5
0
 public BUSUnit()
 {
     unitDAO = new DAOUnit();
 }