コード例 #1
0
        private void btnApply_Click(object sender, EventArgs e)
        {
            try
            {
                MyCompany _myInfo = new MyCompany();
                _myInfo.B_N = txtBusinessNumber.Text;
                _myInfo.businessType = txtBusinessType.Text;
                _myInfo.chairMan = txtChairman.Text;
                _myInfo.email = txtEmail.Text;
                _myInfo.etc = rtxtETC.Text;
                _myInfo.fax = txtFax.Text;
                _myInfo.homePage = txtHomePage.Text;
                _myInfo.myDetailAddress = txtAddress.Text;
                _myInfo.myName = txtMyName.Text;
                _myInfo.myPostNo = txtZipNumber.Text;
                _myInfo.phone = txtPhone.Text;
                _myInfo.RegistryNumber = txtSocialRegistryNumber.Text;
                _myInfo.startDate = txtInitialDate.Text;
                _myInfo.subB_N = txtSubBusinessNumber.Text;
                _myInfo.subBusinessType = txtBusinessContents.Text;
                SetMyInfo(_myInfo);
            }
            catch (Exception)
            {

            }
        }
コード例 #2
0
ファイル: MyCompanyQuery.cs プロジェクト: hesed7/hitpan
 internal string SetMyCompanyInfo(MyCompany myCompany,bool Exist)
 {
     string val = JsonConvert.SerializeObject(myCompany);
     if (Exist)
     {
         return string.Format("update commonsetting set jsonmyinfo='{0}'", val);
     }
     else
     {
         return string.Format("insert into commonsetting(jsonmyinfo) values('{0}')",val);
     }
 }
コード例 #3
0
ファイル: WebService.cs プロジェクト: hesed7/hitpan
 public int SetMyCompanyInfo(string AuthKey, string serviceURL,MyCompany myCompanyInfo)
 {
     if (!securityManager.CheckSecurityToken(AuthKey))
     {
         throw new Exception("인증된 사용자가 아닙니다");
     }
     //기존 정보가 있는지 검증
     bool Exist = false;
     DataTable dt = DBController.getInstance().GetData(serviceURL, new MyCompanyQuery().GetMyCompanyInfo());
     if (dt!=null && dt.Rows.Count>0)
     {
         Exist = true;
     }
     string Query = new MyCompanyQuery().SetMyCompanyInfo(myCompanyInfo,Exist);
     return DBController.getInstance().SetData(serviceURL,Query);
 }
コード例 #4
0
        private void SetMyInfo(MyCompany _myInfo)
        {
            try
            {
                ICMD cmd = null;

                MyCompanyProxyVO preMyInfo = this._myInfo;
                if (this._myInfo != null)
                {
                    cmd = new libHitpan5.Controller.CommandController.MyCompany.Update(SetMyInfo(), preMyInfo);
                }
                else
                {
                    cmd = new libHitpan5.Controller.CommandController.MyCompany.Insert(SetMyInfo());
                }
                frmMain.htpClientLib.Do(cmd);
                frmMain.htpClientLib.myInfo = SetMyInfo();
            }
            catch (NotAuthException) { MessageBox.Show("나의 정보를 입력하거나 수정할 권한이 없습니다"); }
            catch (NotLoginException) { MessageBox.Show("로그인을 하지 않았습니다"); }
            catch (Exception)
            {
                throw;
            }
        }
コード例 #5
0
        /// <summary>
        /// 현재 입력된 내용을 바탕으로 myInfo를 생성 및 반환
        /// </summary>
        private MyCompanyProxyVO SetMyInfo()
        {
            MyCompany mi = new MyCompany();
            mi.myDetailAddress = this.txtAddress.Text;
            mi.subBusinessType = this.txtBusinessContents.Text;
            mi.B_N = this.txtBusinessNumber.Text;
            mi.businessType = this.txtBusinessType.Text;
            mi.chairMan = this.txtChairman.Text;
            mi.email = this.txtEmail.Text;
            mi.fax = this.txtFax.Text;
            mi.homePage = this.txtHomePage.Text;
            mi.startDate = this.txtInitialDate.Text;
            mi.myName = this.txtMyName.Text;
            mi.phone = this.txtPhone.Text;
            mi.RegistryNumber = this.txtSocialRegistryNumber.Text;
            mi.subB_N = this.txtSubBusinessNumber.Text;
            mi.myPostNo = this.txtZipNumber.Text;
            mi.etc = this.rtxtETC.Text;

            MyCompanyProxyVO mpv = new MyCompanyProxyVO();
            mpv.MyCompany = mi;
            return mpv;
        }