protected void btnDownloadZip_Click(object sender, EventArgs e)
 {
     try
     {
         if (lsLicenseDetail != null && lsLicenseDetail.Count > 0)
         {
             BLL.LicenseBiz LBIZ = new BLL.LicenseBiz();
             var            res  = LBIZ.GenZipFileLicenseByIdCardNo(lsLicenseDetail, base.UserProfile.LoginName);
             if (res.IsError)
             {
                 UCModalError.ShowMessageError = res.ErrorMsg;
                 UCModalError.ShowModalError();
             }
             else
             {
                 lsLicenseDetail = null;
                 PageCheckAll    = null;
                 InitDataToGrid();
                 String dirZip = res.DataResponse;
                 Response.Redirect(LinkRedirect(dirZip), true);
             }
         }
         else
         {
             InitDataToGrid();
             UCModalError.ShowMessageError = "กรุณาเลือกรายการ";
             UCModalError.ShowModalError();
         }
     }
     catch (Exception ex)
     {
         UCModalError.ShowMessageError = ex.Message;
         UCModalError.ShowModalError();
     }
 }
        private void InitDataToGrid()
        {
            try
            {
                TotalRows = TotalRow();
                BLL.LicenseBiz LBIZ = new BLL.LicenseBiz();
                txtNumberGvSearch.Text = (txtTotalPage.Text == LastPage().ToString() ? txtNumberGvSearch.Text : "1");
                int      Page        = int.Parse(txtNumberGvSearch.Text);
                DateTime dateStart   = Convert.ToDateTime(txtApproveDate.Text.Trim());
                DateTime dateEnd     = Convert.ToDateTime(txtExpireDate.Text.Trim());
                string   LicenseType = ddlLicenseType.SelectedValue;
                string   CompCode    = GetCompCode();
                var      res         = LBIZ.GetLicenseDetailByCriteria(dateStart, dateEnd, txtIdCardNo.Text.Trim(), txtNames.Text.Trim(), txtLastname.Text.Trim(), LicenseType, CompCode, Page, rowsPerPage(), false);
                if (res.DataResponse != null)
                {
                    gvLicenseDetail.DataSource = res.DataResponse;
                }
                gvLicenseDetail.DataBind();

                SetControlPage();
                CheckPageSelectAll();

                bool     havaRow = gvLicenseDetail.Rows.Count > 0;
                CheckBox H       = (CheckBox)gvLicenseDetail.HeaderRow.FindControl("headSelected") as CheckBox;
                H.Enabled = havaRow;
                btnDownloadZip.Visible = havaRow;
                lblTotalRows.Text      = String.Format("จำนวน {0} รายการ", TotalRows);
                ctrGridView.Visible    = true;
            }
            catch (Exception ex)
            {
                UCModalError.ShowMessageError = ex.Message;
                UCModalError.ShowModalError();
            }
        }
        protected void btnSearch_Click(object sender, EventArgs e)
        {
            lsLicenseDetail = null;
            PageCheckAll    = null;

            if (Convert.ToDateTime(txtApproveDate.Text) > Convert.ToDateTime(txtExpireDate.Text))
            {
                UCModalError.ShowMessageError = Resources.errorApplicantNoPay_004;
                UCModalError.ShowModalError();
                gvSearch.Visible    = false;
                ctrGridView.Visible = false;
            }
            else if (!string.IsNullOrEmpty(txtCompany.Text) && isCompanyPattern() == false)
            {
                UCModalError.ShowMessageError = "ข้อมูลบริษัทไม่ถูกต้อง";
                UCModalError.ShowModalError();
                gvSearch.Visible    = false;
                ctrGridView.Visible = false;
            }
            else
            {
                //gvSearch.Visible = true;
                //gvSearch.DataSource = GetData();
                //gvSearch.DataBind();

                InitDataToGrid();
            }
        }
Beispiel #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();
            }
        }
Beispiel #5
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();
            }
        }
Beispiel #6
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();
            }
        }
Beispiel #7
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         DataCenterBiz biz  = new DataCenterBiz();
         var           Auto = biz.GetConficValueByTypeAndGroupCode("09", "AP001");
         if (Auto.DataResponse == "0")
         {
             Manage_App = new List <string>();
             base.HasPermit();
             defaultData();
             PnlSearch.Visible = true;
         }
         else
         {
             base.HasPermit();
             UCModalError.ShowMessageError = "การจัดผู้สมัครสอบเข้าสู่ห้องสอบเป็นการจัดการแบบ<u>อัตโนมัติ</u><br/>ผู้ใช้งานไม่สามารถดำเนินการได้ หากมีปัญหากรุณาติดต่อเจ้าหน้าที่ดูแลระบบ";
             UCModalError.ShowModalError();
             PnlSearch.Visible = false;
         }
         //GetPlaceGroup();
         //gv3.Visible = false;
         //gv2.Visible = false;
     }
 }
Beispiel #8
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();
            }
        }
        protected void hplView_Click(object sender, EventArgs e)
        {
            var gr = (GridViewRow)((LinkButton)sender).NamingContainer;

            var HeadNo    = (Label)gr.FindControl("lblHeadNoGv");
            var PaymentNo = (Label)gr.FindControl("lblPaymentNoGv");

            MPDetail.Show();
            lblpaymentNo.Text = HeadNo.Text;
            var biz = new BLL.PaymentBiz();
            var res = biz.GetRecriptByHeadRequestNoAndPaymentNo(HeadNo.Text, PaymentNo.Text);


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

                UCModalError.ShowMessageError = res.ErrorMsg;
                UCModalError.ShowModalError();
            }
            else
            {
                GVPopupReceipt.DataSource = res.DataResponse;
                GVPopupReceipt.DataBind();
                UpdatePanelSearch.Update();
            }
        }
Beispiel #10
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
     {
     }
 }
Beispiel #11
0
 protected void btnSearch_Click(object sender, EventArgs e)
 {
     if (Convert.ToDateTime(txtStartPaidSubDate.Text) > Convert.ToDateTime(txtEndPaidSubDate.Text))
     {
         UCModalError.ShowMessageError = Resources.errorApplicantNoPay_004;
         UCModalError.ShowModalError();
         PnlDetail.Visible = false;
     }
     else
     {
         UpdatePanelGv.Update();
         ListAppNoPay           = new List <DTO.AppNoPay>();
         txtNumberGvSearch.Text = "0";
         txt_Page_now.Text      = "0";
         lbltotalP.Text         = "0";
         BindDataInGridview(true);
         PnlDetail.Visible    = true;
         exportExcel2.Visible = false;
         if (gvSearch.Rows.Count > 0)
         {
             btnExportExcel.Visible = true;
         }
         else
         {
             btnExportExcel.Visible = false;
         }
     }
 }
Beispiel #12
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
     {
     }
 }
Beispiel #13
0
 protected void btnExportExcel2_Click(object sender, ImageClickEventArgs e)
 {
     try
     {
         int total = lblTotalrecord2.Text == "" ? 0 : lblTotalrecord2.Text.ToInt();
         if (total > base.EXCEL_SIZE_Key)
         {
             UCModalError.ShowMessageError = SysMessage.ExcelSizeError;
             UCModalError.ShowModalError();
             UpdatePanelSearch.Update();
         }
         else
         {
             Dictionary <string, string> columns = new Dictionary <string, string>();
             columns.Add("ลำดับ", "RUN_NO");
             columns.Add("เลขบัตรประชาชน", "ID_CARD_NO");
             columns.Add("หมายเลขกลุ่ม", "UPLOAD_GROUP_NO");
             columns.Add("หมายเลข", "SEQ_NO");
             columns.Add("วันที่พิจารณา", "APPROVED_DATE");
             columns.Add("ผู้พิจารณา", "NAME");
             BLL.LicenseBiz biz = new BLL.LicenseBiz();
             export.CreateExcel(biz.GetListLicenseDetailVerify(Session["UploadGroupNoGv"].ToString(), "N", 1, base.EXCEL_SIZE_Key).DataResponse.Tables[0], columns, base.UserProfile);
         }
     }
     catch { }
 }
Beispiel #14
0
 protected void btnSearch_Click(object sender, EventArgs e)
 {
     if (!string.IsNullOrEmpty(txtStartDate.Text) && !string.IsNullOrEmpty(txtEndDate.Text))
     {
         if (Convert.ToDateTime(txtStartDate.Text) > Convert.ToDateTime(txtEndDate.Text))
         {
             UCModalError.ShowMessageError = Resources.errorApplicantNoPay_004;
             UCModalError.ShowModalError();
             pnlSearch.Visible = false;
             divDetail.Visible = false;
             pnlAttach.Visible = false;
         }
         else
         {
             GetLicenseHeadVerify();
             divDetail.Visible = false;
             pnlSearch.Visible = true;
             pnlAttach.Visible = false;
             if (gvHead.Rows.Count > 0)
             {
                 btnExportExcel.Visible = true;
             }
             else
             {
                 btnExportExcel.Visible = false;
             }
         }
     }
     else
     {
         UCModalError.ShowMessageError = SysMessage.PleaseSelectDate;
         UCModalError.ShowModalError();
     }
 }
Beispiel #15
0
        protected void exportExcel2_Click(object sender, ImageClickEventArgs e)
        {
            ExportBiz export = new ExportBiz();

            try
            {
                int total = lblRec.Text == "" ? 0 : lblRec.Text.ToInt();
                if (total > base.EXCEL_SIZE_Key)
                {
                    UCModalError.ShowMessageError = SysMessage.ExcelSizeError;
                    UCModalError.ShowModalError();
                    UpdatePanelGv.Update();
                }
                else
                {
                    Dictionary <string, string> columns = new Dictionary <string, string>();
                    columns.Add("ลำดับ", "RUN_NO");
                    columns.Add("เลขบัตรประชาชน", "ID_CARD_NO");
                    columns.Add("วันที่สมัคร", "CREATED_DATE");
                    columns.Add("ชื่อ", "FIRSTNAME");
                    columns.Add("นามสกุล", "LASTNAME");
                    columns.Add("วันที่สอบ", "TESTING_DATE");

                    var biz = new BLL.PaymentBiz();
                    var res = biz.GetApplicantNoPayment(txtTestingDate.Text, txtTestingNo.Text, txtExamPlaceCode.Text, Convert.ToDateTime(txtStartPaidSubDate.Text),
                                                        Convert.ToDateTime(txtEndPaidSubDate.Text), H_NOW_REQUEST.Value, 1, base.EXCEL_SIZE_Key, false);
                    int[] colum = new int[] { 9 };
                    export.CreateExcel(res.DataResponse, columns);
                }
            }
            catch { }
        }
Beispiel #16
0
        protected void btnSearch_Click(object sender, EventArgs e)
        {
            if (base.UserRegType == DTO.RegistrationType.General)
            {
                BindDataSingle();
                CheckRows();
            }
            else
            {
                if (!string.IsNullOrEmpty(txtstartDate.Text) && !string.IsNullOrEmpty(txttoDate.Text))
                {
                    if (Convert.ToDateTime(txtstartDate.Text) > Convert.ToDateTime(txttoDate.Text))
                    {
                        UCModalError.ShowMessageError = Resources.errorApplicantNoPay_004;
                        UCModalError.ShowModalError();

                        divDetail.Visible = false;
                    }
                    else
                    {
                        BindDataInGv();
                        //DisableTab();
                        CheckRows();
                    }
                }
                else
                {
                    UCModalError.ShowMessageError = SysMessage.PleaseSelectDate;
                    UCModalError.ShowModalError();
                }
            }
        }
Beispiel #17
0
        private void GetLicenseVerify()
        {
            BLL.LicenseBiz        biz     = new BLL.LicenseBiz();
            Func <string, string> GetCrit = anyString =>
            {
                return(string.IsNullOrEmpty(anyString) ? string.Empty : anyString);
            };

            string strLicenseType = GetCrit(ddlLicenseType.SelectedValue);

            if (!string.IsNullOrEmpty(txtStartDate.Text) && !string.IsNullOrEmpty(txtEndDate.Text))
            {
                DateTime dtStartDate = Convert.ToDateTime(GetCrit(txtStartDate.Text));
                DateTime dtEndDate   = Convert.ToDateTime(GetCrit(txtEndDate.Text));


                var     ls = biz.GetLicenseVerifyByRequest(strLicenseType, dtStartDate, dtEndDate, UserProfile.CompCode);
                DataSet ds = ls.DataResponse;

                gvDetail.DataSource = ds;
                gvDetail.DataBind();
            }
            else
            {
                UCModalError.ShowMessageError = SysMessage.PleaseSelectDate;
                UCModalError.ShowModalError();
            }
        }
Beispiel #18
0
        private void GetAssociation()
        {
            try
            {
                if (ddlLicenseType.SelectedIndex > 0)
                {
                    string        AssC = "";
                    DataCenterBiz biz  = new DataCenterBiz();
                    if (base.UserRegType.GetEnumValue() == DTO.RegistrationType.Association.GetEnumValue())
                    {
                        AssC = base.UserProfile.CompCode;
                    }


                    var ls = biz.GetAssociationJoinLicense(AssC, ddlLicenseType.SelectedValue.ToString());
                    ddlAsso.DataValueField = "ASSOCIATION_CODE";
                    ddlAsso.DataTextField  = "ASSOCIATION_NAME";

                    ddlAsso.DataSource = ls.DataResponse;
                    ddlAsso.DataBind();

                    ddlAsso.Items.Insert(0, SysMessage.DefaultSelecting);
                }
                else
                {
                    UCModalError.ShowMessageError = "กรุณาเลือกประเภทใบอนุญาตที่สอบ";
                    UCModalError.ShowModalError();
                }
            }
            catch
            {
            }
        }
Beispiel #19
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();
            }
        }
Beispiel #20
0
        protected void getPlace(string type)
        {
            string id      = ddlGroupExam.SelectedValue.ToString();
            string SQLtemp = string.Empty;

            switch (type)
            {
            case "A":
                var biz = new BLL.DataCenterBiz();
                var res = biz.GetExamPlace_UnderAssocicate("", id);
                if (res.IsError)
                {
                    UCModalError.ShowMessageError = res.ErrorMsg;
                    UCModalError.ShowModalError();
                }
                else
                {
                    bludDiv.Visible = false;
                    DataSet   ds = res.DataResponse;
                    DataTable dt = ds.Tables[0];
                    ddlExamPlaceCode.DataTextField  = "name";
                    ddlExamPlaceCode.DataValueField = "Id";
                    ddlExamPlaceCode.DataSource     = dt.DataSet;
                    ddlExamPlaceCode.DataBind();
                    ddlExamPlaceCode.Items.Insert(0, SysMessage.DefaultSelecting);
                    ddlExamPlaceCode.SelectedIndex = 0;
                }
                break;

            case "G":
                var bizz = new BLL.PaymentBiz();
                var ress = bizz.GetExamCode(id);
                if (ress.IsError)
                {
                    UCModalError.ShowMessageError = ress.ErrorMsg;
                    UCModalError.ShowModalError();
                }
                else
                {
                    DataSet   dss = ress.DataResponse;
                    DataTable dtt = dss.Tables[0];
                    ddlExamPlaceCode.DataTextField  = "PLACE_NAME";
                    ddlExamPlaceCode.DataValueField = "PLACE_ID";
                    ddlExamPlaceCode.DataSource     = dtt.DataSet;
                    ddlExamPlaceCode.DataBind();
                    ddlExamPlaceCode.Items.Insert(0, SysMessage.DefaultSelecting);
                    ddlExamPlaceCode.SelectedIndex = 0;
                }

                break;

            default:

                break;
            }
        }
Beispiel #21
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(
        }
        protected void btnEditSubmit_Click(object sender, EventArgs e)
        {
            var biz = new BLL.PersonBiz();

            PersonTemp item = new PersonTemp();

            item.ID              = this.UserProfile.Id;
            item.COMP_CODE       = ddlPlaceGroup.SelectedValue;
            item.MEMBER_TYPE     = this.MememberTypePlaceGroup;
            item.ID_CARD_NO      = txtIDNumber.Text;
            item.PRE_NAME_CODE   = ddlTitle.SelectedValue;
            item.NAMES           = txtFirstName.Text;
            item.LASTNAME        = txtLastName.Text;
            item.SEX             = rblSex.SelectedValue;
            item.EMAIL           = txtEmail.Text;
            item.LOCAL_TELEPHONE = txtPlaceGroupTel.Text;
            item.TELEPHONE       = txtTel.Text;
            item.ADDRESS_1       = txtAddress.Text;
            item.PROVINCE_CODE   = ddlProvince.SelectedValue;
            item.AREA_CODE       = ddlDistrict.SelectedValue;
            item.TUMBON_CODE     = ddlParish.SelectedValue;
            item.ZIP_CODE        = txtPostcode.Text;
            item.CREATED_BY      = "agdoi";
            item.CREATED_DATE    = DateTime.Now;
            item.UPDATED_BY      = "agdoi";
            item.UPDATED_DATE    = DateTime.Now;


            string firstName = item.NAMES;
            string lastName  = txtLastName.Text;

            var final = biz.SetPersonTemp(item, this.PersonAttachFiles.ToArray());



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

            ClearControl();

            UCModalError.Visible   = false;
            UCModalSuccess.Visible = false;



            MasterPage.SetUsername(firstName, lastName);

            string Alert = "alert('" + Resources.infoSysMessage_RegisSuccess2 + "');window.location.assign('../Register/Reg_Place_Group.aspx?Mode=V')";

            ToolkitScriptManager.RegisterStartupScript(this, this.GetType(), "alert", Alert, true);
        }
Beispiel #23
0
        protected void btnOk_Click(object sender, EventArgs e)
        {
            DTO.ResponseMessage <bool> resValidate = this.RegPassValidation();
            if (resValidate.ResultMessage == false)
            {
                UCModalError.ShowMessageError = this.RegPassValidation().ErrorMsg;
                UCModalError.ShowModalError();
                return;
            }
            else if (resValidate.ResultMessage == true)
            {
                if (txtNewPassword.Text == txtConfirmPassword.Text)
                {
                    //chek รหัสเดิมห้ามตรงกับรหัสใหม่
                    if (txtOldPassword.Text == txtNewPassword.Text)
                    {
                        UCModalError.ShowMessageError = "รหัสผ่านใหม่ห้ามซ้ำกับรหัสผ่านเดิม";
                        UCModalError.ShowModalError();
                        return;
                    }



                    var biz = new BLL.UserAuthenBiz();

                    if (Session[PageList.UserProfile] != null)
                    {
                        DTO.UserProfile userProfile = (DTO.UserProfile)Session[PageList.UserProfile];
                        var             res         = biz.ChangePassword(userProfile.Id, txtOldPassword.Text, txtNewPassword.Text);
                        if (res.IsError)
                        {
                            var errorMsg = res.ErrorMsg;

                            UCModalError.ShowMessageError = res.ErrorMsg;
                            UCModalError.ShowModalError();
                            return;
                        }
                        else
                        {
                            string Alert = "alert('" + Resources.infoSysMessage_RegisSuccess2 + "');window.location.assign('../home.aspx')";
                            ToolkitScriptManager.RegisterStartupScript(this, this.GetType(), "alert", Alert, true);
                        }
                    }
                    else
                    {
                        var errorMsg = Resources.errorChangePass_001;

                        UCModalError.ShowMessageError = errorMsg;
                        UCModalError.ShowModalError();
                        return;
                    }
                }
            }
        }
Beispiel #24
0
        protected void btnExportExcel_Click(object sender, ImageClickEventArgs e)
        {
            try
            {
                int total = lblTotal.Text == "" ? 0 : lblTotal.Text.ToInt();
                if (total > base.EXCEL_SIZE_Key)
                {
                    UCModalError.ShowMessageError = SysMessage.ExcelSizeError;
                    UCModalError.ShowModalError();
                    UpdatePanelGv.Update();
                }
                else
                {
                    ExportBiz export = new ExportBiz();
                    Dictionary <string, string> columns = new Dictionary <string, string>();
                    columns.Add("ลำดับ", "RUN_NO");
                    columns.Add("เลขที่ใบสั่งจ่ายกลุ่ม", "GROUP_REQUEST_NO");
                    columns.Add("วันครบกำหนดชำระ", "EXPIRATION_DATE");
                    columns.Add("จำนวนเงินในใบสั่งจ่ายกลุ่ม", "GROUP_AMOUNT");

                    List <HeaderExcel> header = new List <HeaderExcel>();
                    header.Add(new HeaderExcel
                    {
                        NameColumnsOne  = "วันที่ต้องชำระเงิน(เริ่ม) ",
                        ValueColumnsOne = txtStartPaidSubDate.Text,
                        NameColumnsTwo  = "วันที่ต้องชำระเงิน(สิ้นสุด) ",
                        ValueColumnsTwo = txtEndPaidSubDate.Text
                    });

                    header.Add(new HeaderExcel
                    {
                        NameColumnsOne  = "วันที่สอบ ",
                        ValueColumnsOne = txtTestingDate.Text,
                        NameColumnsTwo  = "รหัสรอบสอบ ",
                        ValueColumnsTwo = txtTestingNo.Text
                    });

                    header.Add(new HeaderExcel
                    {
                        NameColumnsOne  = "รหัสสนามสอบ ",
                        ValueColumnsOne = txtExamPlaceCode.Text
                    });



                    var biz = new BLL.PaymentBiz();
                    var res = biz.GetApplicantNoPaymentHeadder(Convert.ToDateTime(txtStartPaidSubDate.Text),
                                                               Convert.ToDateTime(txtEndPaidSubDate.Text), txtTestingDate.Text, txtTestingNo.Text, txtExamPlaceCode.Text, 1, base.EXCEL_SIZE_Key, false);
                    export.CreateExcel(res.DataResponse.Tables[0], columns, header, base.UserProfile);
                }
            }
            catch { }
        }
Beispiel #25
0
 protected void btnSend_Click(object sender, EventArgs e)
 {
     if (ddlApprove.Text == "เลือก")
     {
         UCModalError.ShowMessageError = "กรุณาเลือกผลการพิจารณา";
         UCModalError.ShowModalError();
     }
     else
     {
         UpdateApplicantChange();
     }
 }
Beispiel #26
0
 protected void btnSearchGo_Click(object sender, EventArgs e)
 {
     if (ddlStatus.SelectedItem.Text != "เลือก")
     {
         txtNumberGvSearch.Text = "0";
         BindData(true);
     }
     else
     {
         UCModalError.ShowMessageError = "กรุณาเลือกสถานะ";
         UCModalError.ShowModalError();
     }
 }
Beispiel #27
0
 protected void btnSearch_Click(object sender, EventArgs e)
 {
     if (!string.IsNullOrEmpty(txtStartDate.Text) && !string.IsNullOrEmpty(txtEndDate.Text))
     {
         GetLicenseVerify();
         pnlSearch.Visible = true;
     }
     else
     {
         UCModalError.ShowMessageError = SysMessage.PleaseSelectDate;
         UCModalError.ShowModalError();
     }
 }
Beispiel #28
0
        protected void btnExportExcel_Click(object sender, ImageClickEventArgs e)
        {
            try
            {
                int total = lblTotal.Text == "" ? 0 : Regex.Replace(lblTotal.Text, "[^0-9]", "").ToInt();
                if (total > base.EXCEL_SIZE_Key)
                {
                    UCModalError.ShowMessageError = SysMessage.ExcelSizeError;
                    UCModalError.ShowModalError();
                    UpdatePanelSearch.Update();
                }
                else
                {
                    ExportBiz export = new ExportBiz();
                    Dictionary <string, string> columns = new Dictionary <string, string>();
                    columns.Add("ลำดับ", "RUN_NO");
                    columns.Add("ประเภทการชำระ", "PETITION_TYPE_NAME");
                    columns.Add("บัตรประชาชน", "ID_CARD_NO");
                    columns.Add("ชื่อ", "FIRST_NAME");
                    columns.Add("นามสกุล", "LASTNAME");
                    columns.Add("เลขที่ใบสั่งจ่าย", "group_request_no");
                    columns.Add("รหัสรอบสอบ", "TESTING_NO");
                    columns.Add("วันที่ออกใบสั่งจ่าย", "CREATED_DATE");
                    columns.Add("วันที่ชำระเงิน", "payment_date");
                    columns.Add("เลขที่ใบเสร็จ", "RECEIPT_NO");

                    List <HeaderExcel> header = new List <HeaderExcel>();
                    header.Add(new HeaderExcel
                    {
                        NameColumnsOne  = "หน่วยงานจัดสอบ ",
                        ValueColumnsOne = ddlGroupExam.SelectedItem.Text,
                        NameColumnsTwo  = "สนามสอบ ",
                        ValueColumnsTwo = ddlExamPlaceCode.SelectedItem.Text
                    });

                    header.Add(new HeaderExcel
                    {
                        NameColumnsOne  = "วันที่สั่งจ่าย(เริ่ม) ",
                        ValueColumnsOne = txtStartDate.Text,
                        NameColumnsTwo  = "วันที่สั่งจ่าย(สิ้นสุด) ",
                        ValueColumnsTwo = txtEndDate.Text
                    });

                    var biz = new BLL.PaymentBiz();
                    var res = biz.GetPaymentDetailByGroup(base.UserProfile.MemberType, ddlGroupExam.SelectedValue.ToString(),
                                                          ddlExamPlaceCode.SelectedValue.ToString(), Convert.ToDateTime(txtStartDate.Text), Convert.ToDateTime(txtEndDate.Text), 1, base.EXCEL_SIZE_Key, false, base.UserProfile.CompCode);
                    export.CreateExcel(res.DataResponse.Tables[0], columns, header, base.UserProfile);
                }
            }
            catch { }
        }
Beispiel #29
0
        protected void btnExportExcel_Click(object sender, ImageClickEventArgs e)
        {
            try
            {
                int total = lblTotalrecord.Text == "" ? 0 : lblTotalrecord.Text.ToInt();
                if (total > base.EXCEL_SIZE_Key)
                {
                    UCModalError.ShowMessageError = SysMessage.ExcelSizeError;
                    UCModalError.ShowModalError();
                    UpdatePanelSearch.Update();
                }
                else
                {
                    Dictionary <string, string> columns = new Dictionary <string, string>();
                    columns.Add("ลำดับ", "RUN_NO");
                    columns.Add("เลขที่ใบคำขออนุญาต", "UPLOAD_GROUP_NO");
                    columns.Add("ชื่อไฟล์", "FILENAME");
                    columns.Add("วันที่นำส่ง", "TRAN_DATE");
                    columns.Add("รูปแบบการขอใบอนุญาต", "PETITION_TYPE_NAME");
                    columns.Add("ประเภทการขอใบอนุญาต", "LICENSE_TYPE_NAME");
                    columns.Add("รายการทั้งหมด", "LOTS");

                    List <HeaderExcel> header = new List <HeaderExcel>();
                    header.Add(new HeaderExcel
                    {
                        NameColumnsOne  = "ประเภท ",
                        ValueColumnsOne = ddlLicenseType.SelectedItem.Text
                    });
                    header.Add(new HeaderExcel
                    {
                        NameColumnsOne  = "ตั้งแต่วันที่ ",
                        ValueColumnsOne = txtStartDate.Text,
                        NameColumnsTwo  = "ถึงวันที่ ",
                        ValueColumnsTwo = txtEndDate.Text
                    });



                    BLL.LicenseBiz        biz     = new BLL.LicenseBiz();
                    Func <string, string> GetCrit = anyString =>
                    {
                        return(string.IsNullOrEmpty(anyString) ? string.Empty : anyString);
                    };
                    string   strLicenseType = GetCrit(ddlLicenseType.SelectedValue);
                    DateTime dtStartDate    = Convert.ToDateTime(GetCrit(txtStartDate.Text == "" ? "" : txtStartDate.Text));
                    DateTime dtEndDate      = Convert.ToDateTime(GetCrit(txtEndDate.Text == "" ? "" : txtEndDate.Text));
                    export.CreateExcel(biz.GetResultLicenseVerifyHead(strLicenseType, dtStartDate, dtEndDate, base.UserProfile.CompCode, "N", 1, base.EXCEL_SIZE_Key).DataResponse.Tables[0], columns, header, base.UserProfile);
                }
            }
            catch { }
        }
Beispiel #30
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();
                }
            }
        }