예제 #1
0
 public static Dt_netcustomers findCustomerByName(string cusName)
 {
     try
     {
         Dt_netcustomers cus = Dt_netcustomersDao.FindFirst(new EqExpression("Customername", cusName), new EqExpression("Isdeleted", (int)EnmIsdeleted.使用中));
         return(cus);
     }
     catch (Exception ex)
     {
         Log.Error(ex.Message);
         return(null);
     }
 }
예제 #2
0
 public static Dt_netcustomers findCustomerById(int id)
 {
     try
     {
         Dt_netcustomers cus = Dt_netcustomersDao.FindFirst(new EqExpression("Id", id));
         return(cus);
     }
     catch (Exception ex)
     {
         Log.Error(ex.Message);
         MessageHelper.ShowMessage("E999");
         return(null);
     }
 }
예제 #3
0
 public static bool updateCustomerInfo(Dt_netcustomers cus)
 {
     try
     {
         cus.Update();
         return(true);
     }
     catch (Exception ex)
     {
         Log.Error(ex.Message);
         MessageHelper.ShowMessage("E999");
         return(false);
     }
 }
예제 #4
0
 public static void saveCustomerInfo(Dt_netcustomers cus)
 {
     try
     {
         if (findCustomerByName(cus.Customername) != null)
         {
             MessageHelper.ShowMessage("E004");
             return;
         }
         cus.Save();
     }
     catch (Exception ex)
     {
         Log.Error(ex.Message);
         MessageHelper.ShowMessage("E999");
     }
 }