private void LoadEmails() { SystemConfigService systemConfigService = null; try { systemConfigService = new SystemConfigService(); var fromMail = systemConfigService.GetByName("FromEmail"); var toMail = systemConfigService.GetByName("ToEmail"); if (fromMail != null) { txtFromEmail.Text = fromMail.ValueString; } if (toMail != null) { txtToEmail.Text = toMail.ValueString; } } catch (Exception) { throw; } finally { systemConfigService = null; } }
private void btnSaveEmailInfo_Click(object sender, EventArgs e) { SystemConfigService systemConfigService = null; try { systemConfigService = new SystemConfigService(); var fromEmail = systemConfigService.GetByName("FromEmail"); var toEmail = systemConfigService.GetByName("ToEmail"); if (fromEmail != null) { fromEmail.ValueString = txtFromEmail.Text.Trim(); systemConfigService.EditSystemConfig(fromEmail); } if (toEmail != null) { toEmail.ValueString = txtToEmail.Text.Trim(); systemConfigService.EditSystemConfig(toEmail); } } catch (Exception) { throw; } finally { systemConfigService = null; } }
private void btnSave_Click(object sender, EventArgs e) { try { var tickValue = dtpApplyDate.Value.Ticks; SystemConfigService systemConfigService = new SystemConfigService(); var sc = systemConfigService.GetByName("ApplyPricingDate"); if (sc != null) { sc.ValueNumber = tickValue; systemConfigService.EditSystemConfig(sc); } sc = systemConfigService.GetByName("DirectorName"); if (sc != null) { sc.ValueString = txtDirectorName.Text; systemConfigService.EditSystemConfig(sc); } Utilities.ShowMessage("Lưu thành công"); } catch (Exception) { throw; } }
private void LoadDApplyDate() { try { SystemConfigService systemConfigService = new SystemConfigService(); var sc = systemConfigService.GetByName("ApplyPricingDate"); if (sc != null) { dtpApplyDate.Value = new DateTime((long)sc.ValueNumber.Value); } } catch (Exception ex) { throw; } }
private void LoadDirectorName() { try { SystemConfigService systemConfigService = new SystemConfigService(); var sc = systemConfigService.GetByName("DirectorName"); if (sc != null) { txtDirectorName.Text = sc.ValueString; } } catch (Exception ex) { throw; } }