Exemplo n.º 1
0
        protected void btnLoadInfo_Click(object sender, EventArgs e)
        {
            if (!string.IsNullOrEmpty(_FilePath))
            {
                XmlDocument webconfigDoc = new XmlDocument();
                webconfigDoc.Load(_FilePath);

                ConnectStringView1.GetConnectString(webconfigDoc);
                ClassFactoryView1.GetClassFactory(webconfigDoc);
                AutoRemindFunctionSetView1.GetFunctionSetting(webconfigDoc);
                MailSettingView1.GetMailSetting(webconfigDoc);
                AttendanceSettingView1.GetAttendanceSetting(webconfigDoc);
            }
            else
            {
                lbLoadMessage.Text = "请选择一个App.Config";
            }
        }
Exemplo n.º 2
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            if (CheckValidation())
            {
                XmlDocument webconfigDoc = new XmlDocument();
                webconfigDoc.Load(_FilePath);
                ConnectStringView1.SetConnectString(webconfigDoc);
                ClassFactoryView1.SetClassFactory(webconfigDoc);
                AutoRemindFunctionSetView1.SetFunctionSetting(webconfigDoc);
                MailSettingView1.SetMailSetting(webconfigDoc);
                AttendanceSettingView1.SetAttendanceSetting(webconfigDoc);

                //保存设置
                webconfigDoc.Save(_FilePath);
                Message = "保存成功";
                NextPage();
            }
            else
            {
                Message = "保存失败";
            }
        }
Exemplo n.º 3
0
        private bool CheckValidation()
        {
            bool iRet = true;

            if (string.IsNullOrEmpty(_FilePath))
            {
                lbLoadMessage.Text = "请选择一个App.Config";
                iRet = false;
            }
            else
            {
                lbLoadMessage.Text = "";
            }

            #region 数据库链接
            iRet = iRet && ConnectStringView1.CheckConnectionStringValid();
            if (SubSystemSetView1.HasHrmisSystem)
            {
                iRet = iRet && ConnectStringView1.CheckHRMISConnectionStringValid();
            }
            if (SubSystemSetView1.HasCRMSystem)
            {
                iRet = iRet && ConnectStringView1.CheckCrmConnectionStringValid();
            }

            if (SubSystemSetView1.HasMyCMMISystem)
            {
                iRet = iRet && ConnectStringView1.CheckMyCMMIConnectionStringValid();
            }

            #endregion

            iRet = iRet && AutoRemindFunctionSetView1.CheckValid();
            iRet = iRet && AttendanceSettingView1.CheckValid();

            return(iRet);
        }