Esempio n. 1
0
 protected void btnGetOut_Click(object sender, EventArgs e)
 {
     try
     {
         if (Manage_App.ToArray().Count() > 0)
         {
             BLL.ApplicantBiz abiz = new ApplicantBiz();
             var res = abiz.CancleExamApplicantManage(Manage_App.ToArray(), selectRoom.Text);
             if (res.ResultMessage == false)
             {
                 UCModalError.ShowMessageError = res.ErrorMsg;
                 UCModalError.ShowModalError();
             }
             else
             {
                 ClickView("");
                 UCModalSuccess.ShowMessageSuccess = SysMessage.SaveSucess;
                 UCModalSuccess.ShowModalSuccess();
             }
             Manage_App = null;
             UpdatePanelSearch.Update();
         }
         else
         {
             UCModalError.ShowMessageError = "กรุณาเลือกผู้สมัครสอบก่อนทำรายการ";
             UCModalError.ShowModalError();
         }
     }
     catch
     {
     }
 }
Esempio n. 2
0
        protected void btnImport_Click(object sender, EventArgs e)
        {
            BLL.PaymentBiz biz = new BLL.PaymentBiz();
            IList <DTO.ImportBankTransferData> refRequests = new List <DTO.ImportBankTransferData>();

            foreach (var item in GvCheckListSource)
            {
                refRequests.Add(new DTO.ImportBankTransferData()
                {
                    Id = item.Id, Ref1 = item.Ref1, Status = item.Status, ChangeRef1 = item.ChangeRef1, ChangeAmount = item.ChangeAmount
                });
            }
            DTO.ImportBankTransferRequest importBankTransferRequest = new DTO.ImportBankTransferRequest();
            importBankTransferRequest.ImportBankTransfers = refRequests;
            importBankTransferRequest.UserOicId           = UserProfile.OIC_EMP_NO;
            //importBankTransferRequest.UserOicId = UserProfile.OIC_User_Id;
            importBankTransferRequest.GroupId = hdfGroupID.Value;
            importBankTransferRequest.UserId  = UserProfile.Id;
            var res = biz.SubmitBankTrans(importBankTransferRequest);

            if (res.IsError)
            {
                UCModalError.ShowMessageError = res.ErrorMsg;
                UCModalError.ShowModalError();
            }
            else
            {
                hdfID.Value                       = string.Empty;
                hdfGroupID.Value                  = string.Empty;
                pnlImportFile.Visible             = false;
                UCModalSuccess.ShowMessageSuccess = res.DataResponse;
                UCModalSuccess.ShowModalSuccess();
            }
        }
Esempio n. 3
0
 protected void btnAddIn_Click(object sender, EventArgs e)
 {
     try
     {
         if (Manage_App.ToArray().Count() > 0)
         {
             BLL.ApplicantBiz abiz = new ApplicantBiz();
             var res = abiz.SaveExamAppRoom(Manage_App.ToArray(), ddlroom.Text, selectRoom.Text, "", false, base.UserId);
             if (res.ResultMessage)//save OK
             {
                 ClickView(selectRoom.Text);
                 UCModalSuccess.ShowMessageSuccess = SysMessage.SaveSucess;
                 UCModalSuccess.ShowModalSuccess();
             }
             else
             {
                 UCModalError.ShowMessageError = res.ErrorMsg;
                 UCModalError.ShowModalError();
             }
             Manage_App = null;
             UpdatePanelSearch.Update();
         }
         else
         {
             UCModalError.ShowMessageError = "กรุณาเลือกผู้สมัครสอบก่อนทำรายการ";
             UCModalError.ShowModalError();
         }
     }
     catch
     {
     }
 }
Esempio n. 4
0
        protected void btnSaveRecordPerPage_Click(object sender, EventArgs e)
        {
            var biz = new BLL.DataCenterBiz();

            PrintPerPage.Add(new DTO.ConfigPrintPayment
            {
                Id         = "08",
                ITEM_VALUE = txtRecordPerBillPayment.Text,
                GROUP_CODE = this.iasgroupCodeRecordPerPage,
                USER_ID    = base.UserId
            });
            var res = biz.SaveConfigPrint(PrintPerPage);

            if (res.IsError)
            {
                UCModalError.ShowMessageError = res.ErrorMsg;
                UCModalError.ShowModalError();
                BindDataRecordPerPage();
            }
            else
            {
                UCModalSuccess.ShowMessageSuccess = "บันทึกข้อมูลสำเร็จ";
                UCModalSuccess.ShowModalSuccess();
                BindDataRecordPerPage();
                PrintPerPage.Clear();
                uplPaymentExpireDay.Update();
            }
        }
Esempio n. 5
0
        protected void LinkButtonDelete_Click(Object sender, EventArgs e)
        {
            var gv = (GridViewRow)((LinkButton)sender).NamingContainer;
            //gv.Cells[0].Visible = true;
            string strNo = ((Label)gv.Cells[0].Controls[0]).Text;

            BLL.DataCenterBiz biz      = new BLL.DataCenterBiz();
            DTO.UserProfile   profiles = (DTO.UserProfile)HttpContext.Current.Session[PageList.UserProfile];
            string            Alert    = "confirm('" + Resources.infoSettingAttach_001 + "')";

            ToolkitScriptManager.RegisterClientScriptBlock(this, this.GetType(), "confirm", Alert, true);
            var res = biz.DeleteConfigDocument(Convert.ToInt16(strNo), profiles);

            if (res.IsError)
            {
                UCModalError.ShowMessageError = res.ErrorMsg;
                UCModalError.ShowModalError();
            }
            else
            {
                UCModalSuccess.ShowMessageSuccess = SysMessage.DeleteConfigLicense;
                UCModalSuccess.ShowModalSuccess();
                UpdatePanelGrid.Update();
            }
        }
Esempio n. 6
0
        public void EditPersonal(DTO.MemberType memberType, DTO.PersonTemp personal)
        {
            var    biz = new BLL.PersonBiz();
            String res = ucAttachFileControl1.ValidDocRequire();

            if (String.IsNullOrEmpty(res))
            {
                var final = biz.SetPersonTemp(personal, ucAttachFileControl1.AttachFiles.Where(p => p.FILE_STATUS != "A").ConvertToPersonAttatchFiles().ToArray());
                if ((final.IsError) || (final.ResultMessage == false))
                {
                    UCModalError.ShowMessageError = final.ErrorMsg;
                    UCModalError.ShowModalError();
                }
                else if (final.ResultMessage == true)
                {
                    UCModalSuccess.ShowMessageSuccess = SysMessage.SaveSucess;
                    UCModalSuccess.ShowModalSuccess();
                    btnClose.Visible  = true;
                    btnCancel.Visible = false;
                    btnOk.Visible     = false;
                    //Response.Redirect("~/BankPage.aspx");
                }
            }
            else
            {
                ModelError.ShowMessageError = res;
                ModelError.ShowModalError();
            }
        }
Esempio n. 7
0
        /// <summary>
        /// AddNew : ตั้งค่าเอกสารขอรับใบอนุญาต
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        /// <EDITOR>Natta</EDITOR>
        /// <LASTUPDATE>09/08/2557</LASTUPDATE>
        protected void btnInsertConfigLicense_Click(object sender, EventArgs e)
        {
            if (ddlPetitionType.SelectedIndex > 0 && ddlLicenseType.SelectedIndex > 0 && ddlLicenseDocumentType.SelectedIndex > 0)
            {
                BLL.DataCenterBiz  biz = new BLL.DataCenterBiz();
                DTO.ConfigDocument doc = new DTO.ConfigDocument();
                var detail             = biz.GetConfigDocumentLicense(ddlPetitionType.SelectedValue, ddlLicenseType.SelectedValue, ddlLicenseDocumentType.SelectedValue);
                if (detail.DataResponse != null)
                {
                    UCModalError.ShowMessageError = SysMessage.DupConfigSettingDocument;
                    UCModalError.ShowModalError();
                    UpdatePanelGrid.Update();
                }
                else
                {
                    doc.FUNCTION_ID        = "41";
                    doc.PETITION_TYPE_CODE = ddlPetitionType.SelectedValue;
                    doc.LICENSE_TYPE_CODE  = ddlLicenseType.SelectedValue;
                    doc.DOCUMENT_CODE      = ddlLicenseDocumentType.SelectedValue;
                    doc.CREATED_BY         = base.UserProfile.Name;
                    doc.CREATED_DATE       = DateTime.Today.ToString();
                    doc.UPDATED_DATE       = DateTime.Today.ToString();
                    doc.UPDATED_BY         = base.UserProfile.Name;
                    if (chkDocumentLicense.Checked == true)
                    {
                        doc.DOCUMENT_REQUIRE = "Y";
                    }
                    else
                    {
                        doc.DOCUMENT_REQUIRE = "N";
                    }
                    doc.STATUS = "A";
                    var res = biz.InsertConfigDocument(doc, base.UserProfile);
                    if (res.IsError)
                    {
                        UCModalError.ShowMessageError = res.ErrorMsg;
                        UCModalError.ShowModalError();
                    }
                    else
                    {
                        UCModalSuccess.ShowMessageSuccess = SysMessage.InsertSuccess;
                        UCModalSuccess.ShowModalSuccess();
                        UpdatePanelGrid.Update();
                    }
                }
            }
            else
            {
                BindDataLicenseTab();
                dvSubmitConfigLicense.Style.Add("display", "none");
                CreateTab();
                UpdatePanelGrid.Update();

                UCModalError.ShowMessageError = SysMessage.PleaseInputFill;
                UCModalError.ShowModalError();
            }
        }
Esempio n. 8
0
        protected void btnOkInspectorDoc_Click(object sender, EventArgs e)
        {
            var data = new List <DTO.ConfigEntity>();

            foreach (GridViewRow gr in gvInspectorDoc.Rows)
            {
                var lblIdGvInspectorDoc           = (Label)gr.FindControl("lblIdGvInspectorDoc");
                var ddlInspector                  = (DropDownList)gr.FindControl("ddlInspector");
                var chkSpecifiedValueInspectorDoc = (CheckBox)gr.FindControl("chkSpecifiedValueInspectorDoc");

                if (((CheckBox)gr.FindControl("chkSpecifiedValueInspectorDoc")).Checked == true)
                {
                    data.Add(new DTO.ConfigEntity
                    {
                        Id         = lblIdGvInspectorDoc.Text,
                        Value      = ddlInspector.SelectedValue,
                        Item_Value = "Y"
                    });
                }
                else
                {
                    data.Add(new DTO.ConfigEntity
                    {
                        Id         = lblIdGvInspectorDoc.Text,
                        Value      = ddlInspector.SelectedValue,
                        Item_Value = "N"
                    });
                }
            }

            if (data != null)
            {
                var biz = new BLL.DataCenterBiz();

                var res = biz.UpdateConfigApproveDocument(data);

                if (res.IsError)
                {
                    var errorMsg = res.ErrorMsg;

                    UCModalError.ShowMessageError = res.ErrorMsg;
                    UCModalError.ShowModalError();
                }
                else
                {
                    UCModalSuccess.ShowMessageSuccess = "บันทึกข้อมูลเรียบร้อย";
                    UCModalSuccess.ShowModalSuccess();
                    BindDataInGridView();
                    UpdatePanelGrid.Update();
                }
            }
            //var biz = new BLL.DataCenterBiz();

            //var res = biz.UpdateConfigApproveDocument(
        }
Esempio n. 9
0
        /// <summary>
        /// Update : ตั้งค่าเอกสารสมาชิก
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        /// <EDITOR>Natta</EDITOR>
        /// <LASTUPDATE>09/08/2557</LASTUPDATE>
        protected void btnSubmitConfigDocument_Click(object sender, EventArgs e)
        {
            var data = new List <DTO.ConfigDocument>();

            foreach (GridViewRow gr in gvConfigDocument.Rows)
            {
                Label strNo = (Label)gr.FindControl("lblNo");

                if (((CheckBox)gr.FindControl("chkDocumentRequire")).Checked == true)
                {
                    data.Add(new DTO.ConfigDocument
                    {
                        ID = Convert.ToInt16(strNo.Text),
                        DOCUMENT_REQUIRE = "Y",
                    });
                }
                else
                {
                    data.Add(new DTO.ConfigDocument
                    {
                        ID = Convert.ToInt16(strNo.Text),
                        DOCUMENT_REQUIRE = "N",
                    });
                }
            }

            if (data != null)
            {
                var biz = new BLL.DataCenterBiz();

                var res = biz.UpdateConfigApproveLicense(data, base.UserProfile);

                if (res.IsError)
                {
                    var errorMsg = res.ErrorMsg;

                    UCModalError.ShowMessageError = res.ErrorMsg;
                    UCModalError.ShowModalError();
                }
                else
                {
                    UCModalSuccess.ShowMessageSuccess = SysMessage.SuccessConfigLicense;
                    UCModalSuccess.ShowModalSuccess();
                    GetConfigDocumentGrid();
                    GetMemberType();
                    GetDocumentType();
                    ClearConfigDocumentValue();
                    UpdatePanelGrid.Update();
                }
            }
        }
Esempio n. 10
0
        protected void btnOkApproveRegis_Click(object sender, EventArgs e)
        {
            var data = new List <DTO.ConfigEntity>();

            foreach (GridViewRow gr in gvApproveRegis.Rows)
            {
                var lblIdGvApproveRegis    = (Label)gr.FindControl("lblIdGvApproveRegis");
                var lblValueGvApproveRegis = (Label)gr.FindControl("lblValueGvApproveRegis");

                if (((CheckBox)gr.FindControl("chkSpecifiedValue")).Checked == true)
                {
                    data.Add(new DTO.ConfigEntity
                    {
                        Id    = lblIdGvApproveRegis.Text,
                        Value = "Y"
                    });
                }
                else
                {
                    data.Add(new DTO.ConfigEntity
                    {
                        Id    = lblIdGvApproveRegis.Text,
                        Value = "N"
                    });
                }
            }

            if (data != null)
            {
                var biz = new BLL.DataCenterBiz();

                var res = biz.UpdateConfigApproveMember(data);

                if (res.IsError)
                {
                    var errorMsg = res.ErrorMsg;

                    UCModalError.ShowMessageError = res.ErrorMsg;
                    UCModalError.ShowModalError();
                }
                else
                {
                    UCModalSuccess.ShowMessageSuccess = "บันทึกข้อมูลเรียบร้อย";
                    UCModalSuccess.ShowModalSuccess();
                    BindDataInGridView();
                    UpdatePanelGrid.Update();
                }
            }
        }
Esempio n. 11
0
        protected void btnOverAllApprove_Click(object sender, EventArgs e)
        {
            var data = new List <DTO.SubmitLicenseVerify>();

            if (gvDetail.Visible == true)
            {
                foreach (GridViewRow gr in gvDetail.Rows)
                {
                    if (((CheckBox)gr.FindControl("chkSelectVerify")).Checked == true)
                    {
                        var strSeqNo         = (Label)gr.FindControl("lblIDNumberGv");
                        var strUploadGroupNo = (Label)gr.FindControl("lblGroupIDNumberGv");

                        data.Add(new DTO.SubmitLicenseVerify
                        {
                            SeqNo         = strSeqNo.Text,
                            UploadGroupNo = strUploadGroupNo.Text,
                        });
                    }
                }
            }

            if (data != null)
            {
                var biz = new BLL.LicenseBiz();

                var res = biz.ApproveLicenseVerify(data, "Y", base.UserProfile.CompCode);

                if (res.IsError)
                {
                    var errorMsg = res.ErrorMsg;

                    UCModalError.ShowMessageError = res.ErrorMsg;
                    UCModalError.ShowModalError();
                }
                else
                {
                    UCModalSuccess.ShowMessageSuccess = SysMessage.Approval;
                    UCModalSuccess.ShowModalSuccess();
                    GetLicenseVerify();
                    pnlDetail.Visible    = false;
                    hdfGroupNumber.Value = string.Empty;
                    hdfNumber.Value      = string.Empty;
                }
            }
        }
Esempio n. 12
0
        protected void btnSubmitExtraApproveRegis_Click(object sender, EventArgs e)
        {
            DataCenterBiz biz = new DataCenterBiz();
            //int chkCount = 0;
            List <CheckBox> chkls             = new List <CheckBox>();
            List <DTO.ConfigExtraEntity> data = new List <DTO.ConfigExtraEntity>();


            foreach (CheckBox chk in pnlProfile.Controls.OfType <CheckBox>())
            {
                if (chk.Checked == true)
                {
                    data.Add(new DTO.ConfigExtraEntity
                    {
                        Name  = chk.Text,
                        Value = 1
                    });
                }
                else
                {
                    data.Add(new DTO.ConfigExtraEntity
                    {
                        Name  = chk.Text,
                        Value = 0
                    });
                }
            }

            if (data != null)
            {
                DTO.ResponseMessage <bool> res = biz.UpdateNewConfigApproveMember(data.ToArray(), base.UserProfile);
                if (res.IsError)
                {
                    UCModalError.ShowMessageError = res.ErrorMsg;
                    UCModalError.ShowModalError();
                }
                else
                {
                    UCModalSuccess.ShowMessageSuccess = "บันทึกข้อมูลเรียบร้อย";
                    UCModalSuccess.ShowModalSuccess();

                    this.GetNewRegistrationApprove();
                    UpdatePanelGrid.Update();
                }
            }
        }
Esempio n. 13
0
        public void EditCompany(DTO.MemberType memberType, DTO.PersonTemp personal)
        {
            //var biz = new BLL.PersonBiz();
            //DTO.ResponseMessage<bool> res =  ucAttachFileControl1.DocRequire();
            //if (res.ResultMessage == true)
            //{
            //    var final = biz.SetPersonTemp(personal, ucAttachFileControl1.AttachFiles.Where(p => p.FILE_STATUS != "A").ConvertToPersonAttatchFiles().ToArray());

            //    if (final.IsError)
            //    {
            //        UCModalError.ShowMessageError = final.ErrorMsg;
            //        UCModalError.ShowModalError();

            //    }
            //}
            //else if ((res.ResultMessage == false) || (res.IsError))
            //{
            //    ModelError.ShowMessageError = SysMessage.FileRequire + res.ErrorMsg;
            //    ModelError.ShowModalError();
            //}
            var    biz = new BLL.PersonBiz();
            String res = ucAttachFileControl1.ValidDocRequire();

            if (String.IsNullOrEmpty(res))
            {
                var final = biz.SetPersonTemp(personal, ucAttachFileControl1.AttachFiles.Where(p => p.FILE_STATUS != "A").ConvertToPersonAttatchFiles().ToArray());
                if ((final.IsError) || (final.ResultMessage == false))
                {
                    UCModalError.ShowMessageError = final.ErrorMsg;
                    UCModalError.ShowModalError();
                }
                else if (final.ResultMessage == true)
                {
                    UCModalSuccess.ShowMessageSuccess = SysMessage.SaveSucess;
                    UCModalSuccess.ShowModalSuccess();
                    btnClose.Visible  = true;
                    btnCancel.Visible = false;
                    btnOk.Visible     = false;
                }
            }
            else
            {
                ModelError.ShowMessageError = res;
                ModelError.ShowModalError();
            }
        }
Esempio n. 14
0
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            ReceiveLicenseHeader rech = new ReceiveLicenseHeader();
            var arrCom = ddlCompany.SelectedValue.Split('[', ']');

            rech.IMPORT_DATETIME   = DateTime.Now;
            rech.PETTITION_TYPE    = ddlRequestLicenseType.SelectedValue;
            rech.LICENSE_TYPE_CODE = rech.LICENSE_TYPE = ddlLicenseType.SelectedValue;
            rech.COMP_CODE         = arrCom[1];
            rech.COMP_NAME         = arrCom[0];
            rech.SEND_DATE         = DateTime.Today;
            rech.TOTAL_AGENT       = 1;
            rech.TOTAL_FEE         = txtFee.Text.ToDecimal();

            ReceiveLicenseDetail recd = new ReceiveLicenseDetail();

            recd.IMPORT_ID     = rech.IMPORT_ID;
            recd.PETITION_TYPE = rech.PETTITION_TYPE;
            recd.COMP_CODE     = rech.COMP_CODE;
            recd.SEQ           = "0001";
            recd.LICENSE_FEE   = txtFee.Text.ToDecimal();
            recd.LICENSE_NO    = txtLicenseNumber.Text;
            recd.CITIZEN_ID    = base.IdCard;
            recd.TITLE_NAME    = base.UserProfile.TitleName;
            recd.NAME          = base.UserProfile.Name;
            recd.SURNAME       = base.UserProfile.LastName;

            AttatchFileLicense att = new AttatchFileLicense();
            UserProfile        a   = new DTO.UserProfile();

            BLL.LicenseBiz biz = new BLL.LicenseBiz();
            var            res = biz.InsertSingleReceiveLicense(rech, recd, base.UserProfile);

            if (res.IsError)
            {
                UCModalError.ShowMessageError = res.ErrorMsg;
                UCModalError.ShowModalError();
            }
            else
            {
                UCModalSuccess.ShowMessageSuccess = SysMessage.SuccessInsertLicenseSingle;
                UCModalSuccess.ShowModalSuccess();
            }
        }
Esempio n. 15
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            var biz = new BLL.DataCenterBiz();

            var res = biz.SaveConfigPrint(PrintPayment);

            if (res.IsError)
            {
                UCModalError.ShowMessageError = res.ErrorMsg;
                UCModalError.ShowModalError();
            }
            else
            {
                UCModalSuccess.ShowMessageSuccess = "บันทึกข้อมูลสำเร็จ";
                UCModalSuccess.ShowModalSuccess();
                BindData();
                UpdatePanelSearch.Update();
            }
        }
        private void ImportInsertMode()
        {
            BLL.ApplicantBiz biz = new BLL.ApplicantBiz();

            var result = biz.ApplicantGroupUploadToSubmit(hdfGroupID.Value, base.UserProfile);

            if (!result.IsError)
            {
                UCModalSuccess.ShowMessageSuccess = Resources.infoGroupApplicantDetail_001;
                UCModalSuccess.ShowModalSuccess();
                CleanData();
                pnlImportFile.Visible = false;
            }
            else
            {
                UCModalError.Visible          = true;
                UCModalError.ShowMessageError = result.ErrorMsg;
                UCModalError.ShowModalError();
            }
        }
Esempio n. 17
0
 /// <summary>
 /// AddNew : ตั้งค่าเอกสารแนบแก้ไขข้อมูลผู้สมัครสอบ
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 /// <EDITOR>Natta</EDITOR>
 /// <LASTUPDATE>09/08/2557</LASTUPDATE>
 protected void btnInsertApplicantDetail_Click(object sender, EventArgs e)
 {
     if (ddlApplicantDocumentType.SelectedIndex > 0 && ddlApplicantMemberType.SelectedIndex > 0)
     {
         BLL.DataCenterBiz  biz = new BLL.DataCenterBiz();
         DTO.ConfigDocument doc = new DTO.ConfigDocument();
         //string funcID = DTO.DocFunction.APPLICANT_FUNCTION.GetEnumValue().ToString();
         var detail = biz.GetConfigDocumentByDocumentCode(DTO.DocFunction.APPLICANT_FUNCTION.GetEnumValue().ToString(), ddlApplicantDocumentType.SelectedValue, ddlApplicantMemberType.SelectedValue);
         if (detail.DataResponse != null)
         {
             UCModalError.ShowMessageError = SysMessage.DupConfigSettingDocument;
             UCModalError.ShowModalError();
         }
         else
         {
             doc.FUNCTION_ID      = "64";
             doc.MEMBER_CODE      = ddlApplicantMemberType.SelectedValue;
             doc.DOCUMENT_CODE    = ddlApplicantDocumentType.SelectedValue;
             doc.DOCUMENT_REQUIRE = "N";
             doc.STATUS           = "A";
             var res = biz.InsertConfigDocument(doc, base.UserProfile);
             if (res.IsError)
             {
                 UCModalError.ShowMessageError = res.ErrorMsg;
                 UCModalError.ShowModalError();
             }
             else
             {
                 UCModalSuccess.ShowMessageSuccess = SysMessage.InsertSuccess;
                 UCModalSuccess.ShowModalSuccess();
                 GetApplicantDetailtGrid();
                 //GetConfigDocumentGrid();
             }
         }
     }
     else
     {
         UCModalError.ShowMessageError = SysMessage.PleaseInputFill;
         UCModalError.ShowModalError();
     }
 }
Esempio n. 18
0
        protected void hplDelete_Click(object sender, EventArgs e)
        {
            var gr        = (GridViewRow)((LinkButton)sender).NamingContainer;
            var PaidGroup = (Label)gr.FindControl("lblGroupRequsetNo");
            var biz       = new BLL.PaymentBiz();
            var res       = biz.CancelGroupRequestNo(PaidGroup.Text);

            if (res.IsError)
            {
                UCModalError.ShowMessageError = res.ErrorMsg;
                UCModalError.ShowModalError();
                BindDataInGridView(true);
            }
            else
            {
                BindDataInGridView(true);
                UCModalSuccess.ShowMessageSuccess = Resources.errorSysMessage_CreatePaymentSuccess;
                UCModalSuccess.ShowModalSuccess();
            }
            UpdatePanelSearch.Update();
        }
Esempio n. 19
0
        protected void hplDeleteDocumentType_Click(object sender, EventArgs e)
        {
            var gv    = (GridViewRow)((LinkButton)sender).NamingContainer;
            var strNo = (Label)gv.FindControl("lblNo");

            BLL.DataCenterBiz biz = new BLL.DataCenterBiz();
            var res = biz.DeleteDocumentType(strNo.Text);

            if (res.IsError)
            {
                UCModalError.ShowMessageError = res.ErrorMsg;
                UCModalError.ShowModalError();
            }
            else
            {
                UCModalSuccess.ShowMessageSuccess = SysMessage.DeleteSuccess;
                UCModalSuccess.ShowModalSuccess();
                GetDocumentTypeGrid();
                UpdatePanelGrid.Update();
            }
        }
Esempio n. 20
0
        /// <summary>
        /// Delete : ตั้งค่าเอกสารแนบแก้ไขข้อมูลผู้สมัครสอบ
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        /// <EDITOR>Natta</EDITOR>
        /// <LASTUPDATE>09/08/2557</LASTUPDATE>
        protected void hplDeleteApplicantDetail_Click(object sender, EventArgs e)
        {
            var gv    = (GridViewRow)((LinkButton)sender).NamingContainer;
            var strNo = (Label)gv.FindControl("lblNo");

            BLL.DataCenterBiz biz = new BLL.DataCenterBiz();
            var res = biz.DeleteConfigDocument(Convert.ToUInt16(strNo.Text), base.UserProfile);

            if (res.IsError)
            {
                UCModalError.ShowMessageError = res.ErrorMsg;
                UCModalError.ShowModalError();
            }
            else
            {
                UCModalSuccess.ShowMessageSuccess = SysMessage.DeleteSuccess;
                UCModalSuccess.ShowModalSuccess();
                GetApplicantDetailtGrid();
                //GetConfigDocumentGrid();
                UpdatePanelGrid.Update();
            }
        }
Esempio n. 21
0
        protected void btnSubmitConfigLicense_Click(object sender, EventArgs e)
        {
            int iCountBeforeList    = 0;
            int iCountBeforeRequire = 0;
            int iCountAfterList     = 0;
            int iCountAfterRequire  = 0;

            AjaxControlToolkit.TabContainer containers = (AjaxControlToolkit.TabContainer)tbcDynamic;
            BLL.DataCenterBiz biz = new BLL.DataCenterBiz();
            var ls = biz.GetDocumentLicenseConfigByPetitionTypeName(containers.ActiveTab.HeaderText);

            iCountBeforeList    = biz.GetDocumentLicenseConfigByPetitionTypeName(containers.ActiveTab.HeaderText).DataResponse.Count();
            iCountBeforeRequire = ls.DataResponse.Where(w => w.DOCUMENT_REQUIRE == "Y").Count();

            AjaxControlToolkit.TabContainer container = (AjaxControlToolkit.TabContainer)tbcDynamic;
            foreach (TabPanel tabPanel in container.Controls.OfType <TabPanel>())
            {
                foreach (Class.CustomConfigTable tpControls in tabPanel.Controls.OfType <Class.CustomConfigTable>())
                {
                    tpControls.SaveChange();
                }
            }

            var lsAfter = biz.GetDocumentLicenseConfigByPetitionTypeName(containers.ActiveTab.HeaderText);

            iCountAfterList    = biz.GetDocumentLicenseConfigByPetitionTypeName(containers.ActiveTab.HeaderText).DataResponse.Count();
            iCountAfterRequire = lsAfter.DataResponse.Where(w => w.DOCUMENT_REQUIRE == "Y").Count();

            if (iCountBeforeList == iCountAfterList && iCountBeforeRequire == iCountAfterRequire)
            {
                UCModalError.ShowMessageError = Resources.errorSettingAttach_002;
                UCModalError.ShowModalError();
            }
            else
            {
                UCModalSuccess.ShowMessageSuccess = SysMessage.SuccessConfigLicense;
                UCModalSuccess.ShowModalSuccess();
            }
        }
Esempio n. 22
0
        protected void btnOkCfgCheckExamLicense_Click(object sender, EventArgs e)
        {
            try
            {
                DataCenterBiz           Dcbiz = new DataCenterBiz();
                List <DTO.ConfigEntity> ent   = new List <DTO.ConfigEntity>();
                foreach (GridViewRow row in gvCfgCheckExamLicense.Rows)
                {
                    Label    ID  = row.FindControl("lblIdCfgCheckExamLicense") as Label;
                    CheckBox chk = row.FindControl("chkItemValueCfgCheckExamLicense") as CheckBox;

                    ent.Add(new DTO.ConfigEntity
                    {
                        Id         = ID.Text,
                        Item_Value = (chk.Checked ? "1" : "0")
                    });
                }

                var res = Dcbiz.UpdateConfigCheckExamLicense(ent, UserProfile);
                if (res.IsError)
                {
                    UCModalError.ShowMessageError = res.ErrorMsg;
                    UCModalError.ShowModalError();
                }
                else
                {
                    UCModalSuccess.ShowMessageSuccess = "บันทึกข้อมูลเรียบร้อย";
                    UCModalSuccess.ShowModalSuccess();
                    GridViewDataBindSingleMode("5");
                    UpdatePanelGrid.Update();
                }
            }
            catch (Exception ex)
            {
                UCModalError.ShowMessageError = ex.Message;
                UCModalError.ShowModalError();
            }
        }
Esempio n. 23
0
        protected void btnDelete_Click(object sender, EventArgs e)
        {
            if (ListAppNoPay != null)
            {
                var biz = new BLL.PaymentBiz();
                var res = biz.CancelApplicantsHeader(ListAppNoPay.ToArray());

                if (res.IsError)
                {
                    var errorMsg = res.ErrorMsg;

                    UCModalError.ShowMessageError = res.ErrorMsg;
                    UCModalError.ShowModalError();
                }
                else
                {
                    UCModalSuccess.ShowMessageSuccess = "ยกเลิกรายการ " + ListAppNoPay.Count + " รายการเรียบร้อยแล้ว";
                    UCModalSuccess.ShowModalSuccess();
                    btnDelete.Visible = true;
                    ClearData();
                    btnSearch_Click(sender, e);
                    // BindDataInGridview(true);
                    NPbutton(btnPreviousGvSearch, txtNumberGvSearch, btnNextGvSearch, "", txtTotalPage);
                    PnlDetail.Visible = true;
                    UpdatePanelGv.Update();
                    ListAppNoPay = new List <DTO.AppNoPay>();
                    if (gvSearch.Rows.Count == 0)
                    {
                        btnExportExcel.Visible = false;
                    }
                }
            }
            else
            {
                UCModalError.ShowMessageError = Resources.errorApplicantNoPay_003;
                UCModalError.ShowModalError();
            }
        }
Esempio n. 24
0
 /// <summary>
 /// AddNew : เพิ่มประเภทเอกสาร
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 /// <EDITOR>Natta</EDITOR>
 /// <LASTUPDATE>09/08/2557</LASTUPDATE>
 protected void btnInsertDocumentType_Click(object sender, EventArgs e)
 {
     if (!string.IsNullOrEmpty(txtDocumentName.Text))
     {
         BLL.DataCenterBiz biz = new BLL.DataCenterBiz();
         DTO.DocumentType  doc = new DTO.DocumentType();
         doc.DOCUMENT_NAME    = txtDocumentName.Text;
         doc.DOCUMENT_REQUIRE = "N";
         doc.STATUS           = "A";
         if (chkDocumentLicense.Checked == true)
         {
             doc.DOCUMENT_REQUIRE = "Y";
         }
         else
         {
             doc.DOCUMENT_REQUIRE = "N";
         }
         var res = biz.InsertDocumentType(doc, base.UserProfile);
         if (res.IsError)
         {
             UCModalError.ShowMessageError = res.ErrorMsg;
             UCModalError.ShowModalError();
         }
         else
         {
             UCModalSuccess.ShowMessageSuccess = SysMessage.InsertSuccess;
             UCModalSuccess.ShowModalSuccess();
             ClearDocumentTypeValue();
             GetDocumentTypeGrid();
         }
     }
     else
     {
         UCModalError.ShowMessageError = SysMessage.PleaseInputFill;
         UCModalError.ShowModalError();
     }
 }
Esempio n. 25
0
        private void UpdateApplicantChange()
        {
            var biz = new BLL.ApplicantBiz();

            //var res = biz.GetRequestEditApplicant((DTO.RegistrationType)base.UserProfile.MemberType, txtIdCard.Text, txtTestingNo.Text, base.UserProfile.CompCode);
            //DataTable DT = res.DataResponse.Tables[0];
            //DataRow DR = DT.Rows[0];

            DTO.ApplicantChange AppChange = new DTO.ApplicantChange();

            //AppChange.STATUS = Convert.ToInt16(ddlApprove.SelectedValue);
            AppChange.CHANGE_ID           = Convert.ToInt32(lblChangeid.Text);
            AppChange.ASSOCIATION_USER_ID = base.UserId;
            AppChange.ASSOCIATION_DATE    = DateTime.Today;
            if (ddlApprove.SelectedValue == "0")
            {
                AppChange.ASSOCIATION_RESULT = 1; //ผ่านการพิจารณา
                AppChange.STATUS             = 1; //ส่งเรื่องให้ OIC Approve
            }
            else
            {
                AppChange.ASSOCIATION_RESULT = 2; //ไม่ผ่านการพิจารณา
                AppChange.STATUS             = 1; //ไม่ส่งเรื่องให้ OIC Approve
                if (txtReason.Text == "")
                {
                    txtReason.Text          = "ไม่ผ่านการพิจารณาจากสมาคม";
                    AppChange.CANCEL_REASON = txtReason.Text;
                }
                else
                {
                    AppChange.CANCEL_REASON = txtReason.Text;
                }
            }


            var insertAppChange = biz.InsertApplicantChange(AppChange);

            if (insertAppChange.ResultMessage == true)
            {
                var       res = biz.GetHistoryApplicant((DTO.RegistrationType)base.UserRegType, lblOLdIDCardVisibleF.Text, lblTestingNoVisibleF.Text, base.UserProfile.IdCard, base.UserProfile.CompCode, "", A, Z, false, "", "");
                DataTable DT  = res.DataResponse.Tables[0];
                DataRow   DR  = DT.Rows[0];

                string status         = DR["STATUS"].ToString();
                string asso           = DR["ASSOCIATION_RESULT"].ToString();
                string oic            = DR["OIC_RESULT"].ToString();
                string IDCardCreateBy = DR["CREATE_BY"].ToString();
                string OLDidcard      = DR["OLD_ID_CARD_NO"].ToString();
                string TestingNO      = DR["Testing_no"].ToString();


                var sendMail = biz.SendMailAppChange(IDCardCreateBy, TestingNO, OLDidcard);//ส่งเมล์


                ClearText();
                UCModalSuccess.ShowMessageSuccess = "บันทึกสำเร็จ";
                UCModalSuccess.ShowModalSuccess();
            }
            else
            {
                UCModalError.ShowMessageError = "พบข้อผิดพลาด";
                UCModalError.ShowModalError();
            }
        }
Esempio n. 26
0
        protected void btnOkApproveRegis_Click(object sender, EventArgs e)
        {
            var data = new List <DTO.ConfigEntity>();

            foreach (GridViewRow gr in gvApproveRegis.Rows)
            {
                Label lblIdGvApproveRegis = (Label)gr.FindControl("lblIdGvApproveRegis");
                //Label lblValueGvApproveRegis = (Label)gr.FindControl("lblValueGvApproveRegis");
                DropDownList ddlDateExpiration = (DropDownList)gr.FindControl("ddlDateExpiration");
                if (lblIdGvApproveRegis.Text == "09")
                {
                    if (((CheckBox)gr.FindControl("chkSpecifiedValue")).Checked == true)
                    {
                        data.Add(new DTO.ConfigEntity
                        {
                            Id         = lblIdGvApproveRegis.Text,
                            GROUP_CODE = "AP001",
                            Value      = "1"
                        });
                    }
                    else
                    {
                        data.Add(new DTO.ConfigEntity
                        {
                            Id         = lblIdGvApproveRegis.Text,
                            GROUP_CODE = "AP001",
                            Value      = "0"
                        });
                    }
                }
                else if (lblIdGvApproveRegis.Text == "10")
                {
                    data.Add(new DTO.ConfigEntity
                    {
                        Id         = lblIdGvApproveRegis.Text,
                        GROUP_CODE = "AP001",
                        Value      = ddlDateExpiration.SelectedValue
                    });
                }
            }

            if (data != null)
            {
                var biz = new BLL.ExamScheduleBiz();

                var res = biz.UpdateManageApplicantIn_OutRoom(data);

                if (res.IsError)
                {
                    var errorMsg = res.ErrorMsg;

                    UCModalError.ShowMessageError = res.ErrorMsg;
                    UCModalError.ShowModalError();
                }
                else
                {
                    UCModalSuccess.ShowMessageSuccess = "บันทึกเรียบร้อย";
                    UCModalSuccess.ShowModalSuccess();
                    BindDataInGridView();
                    UpdatePanelGrid.Update();
                }
            }
        }
Esempio n. 27
0
        private void InsertMode()
        {
            BLL.PersonBiz biz = new BLL.PersonBiz();
            PersonTemp    per = new PersonTemp();

            byte[] sign = new byte[1024];

            if (ddlMemberType.SelectedIndex == 2)
            {
                sign = fulSignature.FileBytes;
                string name = fulSignature.FileName;

                if (fulSignature.FileName == "")
                {
                    UCModalError1.ShowMessageError = Resources.errorReg_OIC_001;
                    UCModalError1.ShowModalError();
                    return;
                }

                if (Path.GetExtension(fulSignature.FileName) != ".png")
                {
                    UCModalError1.ShowMessageError = Resources.errorReg_OIC_001;
                    UCModalError1.ShowModalError();
                    return;
                }
            }


            per.ID            = IAS.BLL.Helpers.GenerateIdHelper.GetGenAutoId();
            per.PRE_NAME_CODE = ddlAntecedent.SelectedValue;

            if (rblSex.SelectedValue == "M")
            {
                per.SEX = "M";
            }
            else
            {
                per.SEX = "F";
            }
            per.NAMES       = txtFirstName.Text;
            per.LASTNAME    = txtLastName.Text;
            per.MEMBER_TYPE = this.MemberTypeOfficerOIC;
            per.EMPLOYEE_NO = txtIDNumber.Text;
            var result = biz.InsertOIC(txtIDNumber.Text, txtOICUserName.Text
                                       , ddlAntecedent.SelectedValue, txtFirstName.Text
                                       , txtLastName.Text, rblSex.SelectedValue
                                       , ddlMemberType.SelectedValue, sign);

            if (result.IsError)
            {
                UCModalError1.ShowMessageError = result.ErrorMsg;
                UCModalError1.ShowModalError();
            }
            else
            {
                UCModalSuccess.ShowMessageSuccess = SysMessage.SuccessInsertTypeOIC;
                UCModalSuccess.ShowModalSuccess();
                ClearControl();
                dvOIC.Visible = false;
            }
        }
        protected void InsertApplicantTLog()
        {
            var biz      = new BLL.ApplicantBiz();
            var MaxIDLog = biz.GetApplicantTLogMaxID();

            if (MaxIDLog.DataResponse.Tables[0].Rows.Count > 0)
            {
                DataTable DT = MaxIDLog.DataResponse.Tables[0];
                DataRow   DR = DT.Rows[0];
                string    a  = DR["applicant_code_log"].ToString();
                if (a == "")
                {
                    MaxID = 1;
                }
                else
                {
                    MaxID = Convert.ToInt32(DR["applicant_code_log"]) + 1;
                }
            }
            var ApplicantT = biz.GetApplicantTtoLog((DTO.RegistrationType)base.UserProfile.MemberType, lblIDCARDVisibleF.Text, lblTestingNOVisibleF.Text, lblCompCodeVisibleF.Text);

            DTO.ApplicantTLog appTLog = new DTO.ApplicantTLog();
            {
                DataTable DTAppT = ApplicantT.DataResponse.Tables[0];
                DataRow   DRAppT = DTAppT.Rows[0];


                appTLog.APPLICANT_CODE_LOG = MaxID;
                appTLog.CREATE_BY          = base.UserId;
                appTLog.CREATE_DATE        = DateTime.Today;

                appTLog.APPLICANT_CODE  = Convert.ToInt32(DRAppT["APPLICANT_CODE"]);
                appTLog.TESTING_NO      = DRAppT["TESTING_NO"].ToString();
                appTLog.EXAM_PLACE_CODE = DRAppT["EXAM_PLACE_CODE"].ToString();
                appTLog.ACCEPT_OFF_CODE = DRAppT["ACCEPT_OFF_CODE"].ToString();
                appTLog.APPLY_DATE      = Convert.ToDateTime(DRAppT["APPLY_DATE"]);
                appTLog.ID_CARD_NO      = DRAppT["ID_CARD_NO"].ToString();
                appTLog.PRE_NAME_CODE   = DRAppT["PRE_NAME_CODE"].ToString();
                appTLog.NAMES           = DRAppT["NAMES"].ToString();
                appTLog.LASTNAME        = DRAppT["LASTNAME"].ToString();
                appTLog.BIRTH_DATE      = Convert.ToDateTime(DRAppT["BIRTH_DATE"]);
                appTLog.SEX             = DRAppT["SEX"].ToString();
                appTLog.EDUCATION_CODE  = DRAppT["EDUCATION_CODE"].ToString();
                appTLog.ADDRESS1        = DRAppT["ADDRESS1"].ToString();
                appTLog.ADDRESS2        = DRAppT["ADDRESS2"].ToString();
                appTLog.AREA_CODE       = DRAppT["AREA_CODE"].ToString();
                appTLog.PROVINCE_CODE   = DRAppT["PROVINCE_CODE"].ToString();
                appTLog.ZIPCODE         = DRAppT["ZIPCODE"].ToString();
                appTLog.TELEPHONE       = DRAppT["TELEPHONE"].ToString();
                appTLog.AMOUNT_TRAN_NO  = DRAppT["AMOUNT_TRAN_NO"].ToString();
                appTLog.PAYMENT_NO      = DRAppT["PAYMENT_NO"].ToString();
                appTLog.INSUR_COMP_CODE = DRAppT["INSUR_COMP_CODE"].ToString();
                appTLog.ABSENT_EXAM     = DRAppT["ABSENT_EXAM"].ToString();
                appTLog.RESULT          = DRAppT["RESULT"].ToString();
                if (DRAppT["EXPIRE_DATE"].ToString() != "")
                {
                    appTLog.EXPIRE_DATE = Convert.ToDateTime(DRAppT["EXPIRE_DATE"]);
                }
                //  appTLog.EXPIRE_DATE = Convert.ToDateTime(DRAppT["EXPIRE_DATE"]);
                appTLog.LICENSE           = DRAppT["LICENSE"].ToString();
                appTLog.CANCEL_REASON     = DRAppT["CANCEL_REASON"].ToString();
                appTLog.RECORD_STATUS     = DRAppT["RECORD_STATUS"].ToString();
                appTLog.USER_ID           = DRAppT["USER_ID"].ToString();
                appTLog.USER_DATE         = Convert.ToDateTime(DRAppT["USER_DATE"]);
                appTLog.EXAM_STATUS       = DRAppT["EXAM_STATUS"].ToString();
                appTLog.UPLOAD_GROUP_NO   = DRAppT["UPLOAD_GROUP_NO"].ToString();
                appTLog.HEAD_REQUEST_NO   = DRAppT["HEAD_REQUEST_NO"].ToString();
                appTLog.GROUP_REQUEST_NO  = DRAppT["GROUP_REQUEST_NO"].ToString();
                appTLog.UPLOAD_BY_SESSION = DRAppT["UPLOAD_BY_SESSION"].ToString();
                appTLog.ID_ATTACH_FILE    = DRAppT["ID_ATTACH_FILE"].ToString();

                var insertAppTLog = biz.InsertApplicantTLog(appTLog);
                if (insertAppTLog.ResultMessage == true)
                {
                    UCModalSuccess.ShowMessageSuccess = "บันทึกลงLog";
                    UCModalSuccess.ShowModalSuccess();
                    ClearText();
                    txtReason.Visible = false;
                    txtReason.Visible = false;
                }
                else
                {
                    UCModalError.ShowMessageError = "พบข้อผิดพลาด";
                    UCModalError.ShowModalError();
                }
            }
        }
Esempio n. 29
0
        private void SaveMode()
        {
            BLL.ExamScheduleBiz biz = new BLL.ExamScheduleBiz();

            if (string.IsNullOrEmpty(txtDetailExamCode.Text))
            {
                ExamSchedule ent = new ExamSchedule();

                ent.USER_ID = "AGDOI";
                ent.EXAM_PLACE_GROUP_CODE = ddlDetailYardGroupCode.SelectedValue;
                ent.EXAM_PLACE_CODE       = ddlDetailExamYardCode.SelectedValue;
                ent.TESTING_DATE          = Convert.ToDateTime(txtDetailDateExam.Text);
                ent.TEST_TIME_CODE        = ddlDetailTimeExamCode.SelectedValue;
                ent.LICENSE_TYPE_CODE     = ddlDetailOfficerCode.SelectedValue;
                ent.USER_DATE             = DateTime.Now;
                ent.EXAM_ADMISSION        = txtDetailNumberOfSeat.Text.ToShort();
                ent.EXAM_FEE    = txtDetailFee.Text.ToDecimal();
                ent.EXAM_STATUS = "E";
                ent.EXAM_APPLY  = 0;
                //if (base.UserProfile.MemberType == DTO.RegistrationType.OIC.GetEnumValue())
                //{
                //    ent.EXAM_OWNER = "B";
                //}
                //else if (base.UserProfile.MemberType == DTO.RegistrationType.TestCenter.GetEnumValue())
                //{
                //    ent.EXAM_OWNER = "C";
                //}
                //else
                //{
                //    ent.EXAM_OWNER = "A";
                //}
                if (Convert.ToDateTime(txtDetailDateExam.Text) > DateTime.Now.Date)
                {
                    var res = biz.InsertExam(ent);
                    if (res.IsError)
                    {
                        UCModalError.ShowMessageError = res.ErrorMsg;
                        UCModalError.ShowModalError();
                    }
                    else
                    {
                        UCModalSuccess.ShowMessageSuccess = SysMessage.SaveSucess;
                        UCModalSuccess.ShowModalSuccess();
                    }
                }
                else
                {
                    UCModalError.ShowMessageError = Resources.errorExamSchedule_001;
                    UCModalError.ShowModalError();
                }
            }
            else
            {
                string testingNo     = txtDetailExamCode.Text;
                string examPlaceCode = ddlDetailExamYardCode.SelectedValue;
                if (biz.CanChangeExam(testingNo, examPlaceCode).ResultMessage)
                {
                    ExamSchedule ent  = new ExamSchedule();
                    var          exam = biz.GetExamByTestingNoAndPlaceCode(testingNo, examPlaceCode);
                    ent.TESTING_NO            = txtDetailExamCode.Text;
                    ent.TESTING_DATE          = Convert.ToDateTime(txtDetailDateExam.Text);
                    ent.EXAM_FEE              = txtDetailFee.Text.ToShort();
                    ent.EXAM_STATUS           = "E";
                    ent.EXAM_FEE              = txtDetailFee.Text.ToShort();
                    ent.TEST_TIME_CODE        = ddlDetailTimeExamCode.SelectedValue;
                    ent.EXAM_PLACE_GROUP_CODE = ddlDetailYardGroupCode.SelectedValue;
                    if (ddlDetailYardGroupCode.SelectedValue != "")
                    {
                        ent.EXAM_PLACE_CODE = ddlDetailExamYardCode.SelectedValue;
                    }
                    ent.LICENSE_TYPE_CODE = ddlDetailOfficerCode.SelectedValue;
                    ent.EXAM_APPLY        = 0;
                    ent.EXAM_ADMISSION    = txtDetailNumberOfSeat.Text.ToShort();
                    //ent.EXAM_OWNER = "A";
                    biz.UpdateExam(ent);

                    DateTime dtExam   = Convert.ToDateTime(txtDetailDateExam.Text);
                    string   strMonth = string.Empty;
                    if (dtExam.Date.Month < 10)
                    {
                        strMonth = "0" + dtExam.Date.Month;
                    }
                    //var re = biz.GetExamByCriteria("", "", "", dtExam.Year.ToString() + strMonth, "", Convert.ToDateTime(txtDetailDateExam.Text));
                    //if (re.IsError)
                    //{
                    //    UCModalError.ShowMessageError = re.ErrorMsg;
                    //    UCModalError.ShowModalError();

                    //}

                    //UCModalSuccess.ShowMessageSuccess = SysMessage.SaveSucess;
                    //UCModalSuccess.ShowModalSuccess();

                    //gvExamSchedule.DataSource = re.DataResponse;
                    //gvExamSchedule.DataBind();


                    //gvTable.DataSource = re.DataResponse;
                    //gvTable.DataBind();
                }
                else
                {
                    UCModalError.ShowMessageError = SysMessage.CannotEditExamTestingNo;
                    UCModalError.ShowModalError();
                }
            }
        }
        private void UpdateApplicantChange()
        {
            var biz = new BLL.ApplicantBiz();

            //var res = biz.GetRequestEditApplicant((DTO.RegistrationType)base.UserProfile.MemberType, txtIdCard.Text, txtTestingNo.Text, base.UserProfile.CompCode);
            //DataTable DT = res.DataResponse.Tables[0];
            //DataRow DR = DT.Rows[0];

            DTO.ApplicantChange AppChange = new DTO.ApplicantChange();


            AppChange.CHANGE_ID   = Convert.ToInt32(lblChangeid.Text);
            AppChange.OIC_USER_ID = base.UserId;
            AppChange.OIC_DATE    = DateTime.Today;
            if (ddlApprove.SelectedValue == "1") //อนุมัติ
            {
                AppChange.OIC_RESULT = 1;        //เก็บ Log แล้ว Update AG_Applicant_T
                AppChange.STATUS     = 2;        //อนุมัติ

                InsertApplicantTLog();           //เก็บ Log
            }
            else//ไม่อนุมัติ
            {
                AppChange.OIC_RESULT = 2; //ไม่เก็บLog
                AppChange.STATUS     = 2; //ไม่อนุมัติ
                if (txtReason.Text == "")
                {
                    txtReason.Text          = "ไม่ผ่านการพิจารณาจากคปภ.";
                    AppChange.CANCEL_REASON = txtReason.Text;
                }
                else
                {
                    AppChange.CANCEL_REASON = txtReason.Text;
                }
            }

            AppChange.OLD_ID_CARD_NO = lblIDCARDVisibleF.Text;
            AppChange.TESTING_NO     = lblTestingNOVisibleF.Text;

            AppChange.NEW_ID_CARD_NO = lblNewIDCardVisibleF.Text;
            AppChange.NEW_PREFIX     = Convert.ToDecimal(lblNewPreName.Text);
            AppChange.NEW_FNAME      = lblNewFirstName.Text;
            AppChange.NEW_LNAME      = lblNewLastNames.Text;
            AppChange.CANCEL_REASON  = txtReason.Text;

            var insertAppChange = biz.InsertApplicantChange(AppChange);

            if (insertAppChange.ResultMessage == true)
            {
                var       res1 = biz.GetHistoryApplicant((DTO.RegistrationType)base.UserRegType, lblIDCARDVisibleF.Text, lblTestingNOVisibleF.Text, base.UserProfile.IdCard, base.UserProfile.CompCode, "", A, Z, false, "", "");
                DataTable DT   = res1.DataResponse.Tables[0];
                DataRow   DR   = DT.Rows[0];

                string status         = DR["STATUS"].ToString();
                string assoResult     = DR["ASSOCIATION_RESULT"].ToString();
                string oicResult      = DR["OIC_RESULT"].ToString();
                string IDCardCreateBy = DR["CREATE_BY"].ToString();
                string OLDidcard      = DR["OLD_ID_CARD_NO"].ToString();
                string TestingNO      = DR["Testing_no"].ToString();
                string IDCARDAsso     = DR["ASSOCIATION_USER_ID"].ToString();


                var sendMail = biz.SendMailAppChange(IDCardCreateBy, TestingNO, OLDidcard);//ส่งเมล์

                //if (oicResult == "2")//ไม่อนุมัติ(ส่งให้สมาคมด้วย)
                //{
                //    var sendMailAsso = biz.SendMailAppChange(IDCARDAsso, TestingNO, OLDidcard);//ส่งเมล์
                //}


                ClearText();
                txtReason.Visible = false;
                lblReason.Visible = false;
                UCModalSuccess.ShowMessageSuccess = "บันทึกสำเร็จ";
                UCModalSuccess.ShowModalSuccess();



                #region page
                int Rpage      = (txtNumberGvSearch.Text.Trim() == "") ? 0 : txtNumberGvSearch.Text.Trim().ToInt();
                int resultPage = (Rpage == 0) ? 1 : txtNumberGvSearch.Text.Trim().ToInt();

                resultPage = resultPage == 0 ? 1 : resultPage;
                if ((rowPerpage.Text.Trim() == null) || (rowPerpage.Text.Trim() == "") || (rowPerpage.Text.ToInt() == 0))
                {
                    rowPerpage.Text = PageSize.ToString();
                }
                else
                {
                    PageSize = Convert.ToInt32(rowPerpage.Text);
                }
                #endregion page

                var res = biz.GetApproveEditApplicant((DTO.RegistrationType)base.UserRegType, txtIDCard.Text, txtTestingNo.Text, base.UserProfile.IdCard, base.UserProfile.CompCode, "", resultPage, PageSize, false, base.UserProfile.MemberType.ToString(), "", "");
                res.DataResponse.Clear();
                res.DataResponse.Reset();
                res.DataResponse.RejectChanges();
            }
            else
            {
                UCModalError.ShowMessageError = "พบข้อผิดพลาด";
                UCModalError.ShowModalError();
            }
        }