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