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;
            }
        }
Ejemplo n.º 2
0
        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;
            }
        }