Пример #1
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();
            }
        }
Пример #2
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();
     }
 }