示例#1
0
 private void btn_confirm_MouseClickForAdd(object sender, MouseEventArgs e)
 {
     try
     {
         string pass = checkpass.tbx_pass.Text.Trim();
         if (pass.Equals("ckftmwjd"))
         {
             checkpass.Close();
             if (addcompany != null)
             {
                 insertCompanyInfo(addcompany.tbx_code.Text, addcompany.tbx_name.Text, addcompany.tbx_expire.Text);
                 MessageBox.Show("정상 발급 되었습니다");
                 MACLIST[addcompany.tbx_code.Text] = "";
                 checkpass.Close();
                 addcompany.Close();
             }
         }
     }
     catch (Exception ex)
     {
         logWriter(ex.ToString());
     }
 }
示例#2
0
        private void disposeLicenseResult(string result)//result =
        {
            try
            {
                //result = -1 : 비밀번호 틀림
                //result = 1 : 라이선스 생성 성공
                //result = 0 : 요청정보 부족
                //result = 2 : 라이선스 리스트 정보
                //result = 3 : 코드중복 또는 기한입력오류

                string   license_message = "";
                string[] license_info    = result.Split('†');
                result = license_info[0];


                switch (result)
                {
                case "-1":
                    MessageBox.Show("비밀번호가 올바르지 않습니다.");
                    checkpass.tbx_pass.Focus();
                    break;

                case "1":
                    MessageBox.Show("요청하신 라이선스가 정상발급 되었습니다.");
                    checkpass.Close();
                    addcompany.Close();
                    NoParamDele reload = new NoParamDele(reloadList);
                    Invoke(reload);

                    break;

                case "2":

                    if (license_info.Length > 1)
                    {
                        NoParamDele nodele = new NoParamDele(clearDGV);
                        Invoke(nodele);
                        listDele dele = new listDele(listupLicenseInfo);
                        foreach (string item in license_info)
                        {
                            if (item.Length > 1)
                            {
                                string[] temparr = item.Split('&');     //com_code&comName&2099/12/31
                                Invoke(dele, new object[] { temparr[0], temparr[1], temparr[2] });
                            }
                        }
                    }

                    break;

                case "3":
                    MessageBox.Show("코드가 중복되었거나 만료일자 오류입니다.");
                    checkpass.Close();

                    break;
                }
            }
            catch (Exception ex)
            {
                logWriter(ex.ToString());
            }
        }