Example #1
0
        public CommonSettingProxyVO GetCommonSettings()
        {
            CommonSettingProxyVO cpv = new CommonSettingProxyVO();

            cpv.CommonSettings = sqlProxy.GetCommonSettingInfo(new EncryptionService().GetEncryptedKey(this.EncryptionSeed, DateTime.Now), this.ServiceURL);
            return(cpv);
        }
Example #2
0
        public Update(CommonSettingProxyVO CommonSettinginfo, CommonSettingProxyVO pre_CommonSettinginfo)
            : base("기본설정 입력", Hitpan5ClientLibrary.SQLDataServiceModel)
        {
            this.CommonSettinginfo     = CommonSettinginfo;
            this.pre_CommonSettinginfo = pre_CommonSettinginfo;
            this.dbModel = Hitpan5ClientLibrary.SQLDataServiceModel;

            UserAuthProxyVO ua = new UserAuthProxyVO();

            ua["설정관리"]        = 사용자권한.모두허용;
            base.RequiredAuth = ua;
        }
Example #3
0
 public bool SetCommonSettings(CommonSettingProxyVO CommonSettingProxyVO)
 {
     try
     {
         int i = sqlProxy.SetCommonSettingInfo(new EncryptionService().GetEncryptedKey(this.EncryptionSeed, DateTime.Now), this.ServiceURL, CommonSettingProxyVO.CommonSettings);
         if (i == 0)
         {
             throw new Exception();
         }
         else
         {
             return(true);
         }
     }
     catch (Exception)
     {
         return(false);
     }
 }
Example #4
0
 internal void Update(CommonSettingProxyVO CommonSettinginfo)
 {
     dataModel.SetCommonSettings(CommonSettinginfo);
 }
Example #5
0
 internal void Insert(CommonSettingProxyVO CommonSettinginfo)
 {
     dataModel.SetCommonSettings(CommonSettinginfo);
 }
Example #6
0
 public Insert(CommonSettingProxyVO CommonSettinginfo)
     : base("기본설정 입력", Hitpan5ClientLibrary.SQLDataServiceModel)
 {
     this.CommonSettinginfo = CommonSettinginfo;
     this.dbModel           = Hitpan5ClientLibrary.SQLDataServiceModel;
 }
Example #7
0
        private void frm관리정보설정_Load(object sender, EventArgs e)
        {
            //세팅정보 채우기
            this.commonSettings = frmMain.htpClientLib.settingInfo;
            CommonSettings commonSettings = this.commonSettings.CommonSettings;

            #region pnSettings 채우기
            // 세팅정보 설정 콤보박스 하나하나의 높이
            double height = pnSettings.Height / (typeof(CommonSettings).GetProperties().Length);
            // 세팅정보 설정 콤보박스 하나하나의 top
            double top = height;
            // 세팅정보 설정 라벨중 넓이가 가장 큰 라벨의 넓이(줄세울려고)
            double width = 0;

            //일단 라벨쓰고
            foreach (var prop in typeof(CommonSettings).GetProperties())
            {
                if (prop.Name == "ExtensionData")
                {
                    continue;
                }
                Label lbl = new Label();
                lbl.AutoSize = true;
                lbl.Name     = string.Format("lbl{0}", prop.Name);
                lbl.Text     = string.Format("{0} : ", prop.Name);
                lbl.Top      = Convert.ToInt32(top);
                lbl.Left     = 35;
                lbl.Parent   = pnSettings;
                //제일 큰 라벨의 Width 구하기(넓이 통일 하기 위해)
                if (width < lbl.Width)
                {
                    width = lbl.Width;
                }
                lblList.Add(lbl);

                top += height;
            }
            //라벨크기 재정렬 및 콤보박스 삽입
            foreach (Label lbl in lblList)
            {
                lbl.AutoSize = false;
                lbl.Width    = Convert.ToInt32(width);

                string   enumName  = lbl.Name.Replace("lbl", "");
                Type     _enumType = (typeof(CommonSettings).GetProperty(enumName)).PropertyType;
                ComboBox ddl       = new ComboBox();
                ddl.Name       = "ddl" + enumName;
                ddl.DataSource = Enum.GetNames(_enumType);
                ddl.Parent     = lbl.Parent;
                ddl.Left       = Convert.ToInt32(lbl.Right);
                ddl.Top        = lbl.Top;

                //선택된 데이터 구하기
                if (this.commonSettings != null && this.commonSettings.CommonSettings != null && this.commonSettings[enumName] != null)
                {
                    ddl.Text = Enum.GetName(this.commonSettings[enumName].GetType(), this.commonSettings[enumName]);
                }
                ddlList.Add(ddl);
            }
            #endregion
        }