Пример #1
0
 private void EditApproval(string action)
 {
     wcf.parti.Service1 parti = new wcf.parti.Service1();
     try
     {
         var result = parti.EditApproval(action, txtID.Value, txtAppr_Fullname.Value, txtAppr_Position_name.Value, txtAppr_Position_major.Value,
                                         txtAppr_Relationship_trainee.Value, txtAppr_Office_name.Value, txtAppr_Office_tel.Value, txtAppr_Mobile_tel.Value, txtAppr_Email.Value);
         if (result == "e3")
         {
             MessageBox.swalModal(this.Page, "info", "e3: ມີ ລະຫັດ/ຊື່ຜູ້ໃຊ້ ນີ້ໃນຖານຂໍ້ມູນແລ້ວ ລອງໃສ່ ລະຫັດ/ຊື່ຜູ້ໃຊ້ ໃຫມ່...", "");
         }
         else if (result == "e0")
         {
             MessageBox.swalModal(this.Page, "error", "en:internal error", "");
         }
         else if (result == "e2")
         {
             MessageBox.swalModal(this.Page, "warning", "e2:connection to dbs error...", "");
         }
         else if (result == "e5")
         {
             MessageBox.swalModal(this.Page, "success", "ຈັດການຂໍ້ມູນສຳເລັດ...", Request.RawUrl);
         }
     }
     catch (Exception ex)
     {
         MessageBox.swalModal(this.Page, "error", "en:internal error[" + ex.Message.Replace("'", "") + "]", "");
     }
 }
Пример #2
0
 private void EditApproval(string action)
 {
     wcf.parti.Service1 parti = new wcf.parti.Service1();
     try
     {
         var result = parti.EditApproval(action, txtID.Value, txtAppr_Fullname.Value, txtAppr_Position_name.Value, txtAppr_Position_major.Value,
                                         txtAppr_Relationship_trainee.Value, txtAppr_Office_name.Value, txtAppr_Office_tel.Value, txtAppr_Mobile_tel.Value, txtAppr_Email.Value);
         if (result == "e3")
         {
             MessageBox.swalModal(this.Page, "info", "e3: ມີ ລະຫັດ/ຊື່ຜູ້ໃຊ້ ນີ້ໃນຖານຂໍ້ມູນແລ້ວ ລອງໃສ່ ລະຫັດ/ຊື່ຜູ້ໃຊ້ ໃຫມ່...", "");
         }
         else if (result == "e0")
         {
             MessageBox.swalModal(this.Page, "error", "en:internal error", "");
         }
         else if (result == "e2")
         {
             MessageBox.swalModal(this.Page, "warning", "e2:connection to dbs error...", "");
         }
         else if (result == "e5")
         {
             MessageBox.swalModal(this.Page, "success", "ຈັດການຂໍ້ມູນສຳເລັດ...", Request.RawUrl);
             parti.LoggingAsync("set", "Trainee Approval", "user: "******"username"].ToString() + " had " + action + " a Trainee Approval: " +
                                txtAppr_Fullname.Value + " from system", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), "");
         }
     }
     catch (Exception ex)
     {
         MessageBox.swalModal(this.Page, "error", "en:internal error[" + ex.Message.Replace("'", "") + "]", "");
         parti.LoggingAsync("set", "Trainee Approval", ex.Message, DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), "");
     }
 }