Exemplo n.º 1
0
 public static int Insert_salesperson(int int_person_orgbranch, bool is_person, string str_location,
                                      DateTime date_join, DateTime?date_leave, string str_remark)
 {
     try
     {
         using (Salesperson_dsTableAdapters.QueriesTableAdapter adapter =
                    new Salesperson_dsTableAdapters.QueriesTableAdapter())
         {
             return(int.Parse(adapter.sp_insert_salesperson(int_person_orgbranch, is_person,
                                                            str_location, date_join, date_leave, str_remark, Program.System_user.UserID).ToString()));
         }
     }
     catch (System.Exception e)
     {
         Classes.Class_misc.Display_dataset_error(MethodBase.GetCurrentMethod().DeclaringType.ToString(),
                                                  MethodBase.GetCurrentMethod().Name, e.Message);
     }
     return(0);
 }
Exemplo n.º 2
0
 public static bool Update_salesperson(int int_salesperson, string str_location,
                                       DateTime date_join, DateTime?date_leave, string str_remark)
 {
     try
     {
         using (Salesperson_dsTableAdapters.QueriesTableAdapter adapter =
                    new Salesperson_dsTableAdapters.QueriesTableAdapter())
         {
             adapter.sp_update_salesperson(int_salesperson, str_location,
                                           date_join, date_leave, str_remark, Program.System_user.UserID);
         }
         return(true);
     }
     catch (System.Exception e)
     {
         Classes.Class_misc.Display_dataset_error(MethodBase.GetCurrentMethod().DeclaringType.ToString(),
                                                  MethodBase.GetCurrentMethod().Name, e.Message);
     }
     return(false);
 }