private void EditEducation(string action) { wcf.parti.Service1 parti = new wcf.parti.Service1(); string country = null; if (rdEduIn.Checked) { country = "in"; } else if (rdEduOut.Checked) { country = "out"; } try { var result = parti.EditEducation(action, txtID.Value, txtEducation_level.Value, txtEducation_major.Value, country, txtEducated_year.Value, txtEducation_Name.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", "User Trainer Education", "user: "******"username"].ToString() + " had " + action + " a User Trainer Education: " + txtID.Value + " on 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", "User Trainer Education", ex.Message, DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), ""); } }
private void EditEducation(string action) { wcf.parti.Service1 parti = new wcf.parti.Service1(); string country = null; if (rdEduIn.Checked) { country = "in"; } else if (rdEduOut.Checked) { country = "out"; } try { var result = parti.EditEducation(action, txtID.Value, txtEducation_level.Value, txtEducation_major.Value, country, txtEducated_year.Value, txtEducation_Name.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("'", "") + "]", ""); } }