Пример #1
0
        protected void btnGenLicense_Click(object sender, EventArgs e)
        {
            System.Diagnostics.Stopwatch sw = new System.Diagnostics.Stopwatch();
            sw.Start();
            var biz = new BLL.PaymentBiz();

            if (ListLicense.Count == 0)
            {
                this.MasterSite.ModelError.ShowMessageError = "กรุณาเลือกรายการ";
                this.MasterSite.ModelError.ShowModalError();
                return;
            }
            var res = biz.Insert12T(this.ListLicense.ToArray());

            if (res.ResultMessage == false)
            {
                this.MasterSite.ModelError.ShowMessageError = "ให้ความเห็นชอบออกใบอนุญาตไม่สำเร็จ";
                this.MasterSite.ModelError.ShowModalError();
            }
            else
            {
                ListLicense = new List <DTO.GenLicense>();
                this.MasterSite.ModelSuccess.ShowMessageSuccess = Resources.infoLicenseApprove_001;
                this.MasterSite.ModelSuccess.ShowModalSuccess();

                BindDataInGridView();
            }
            sw.Stop();
            TimeSpan sp3       = sw.Elapsed;
            TimeSpan duration3 = sp3.Duration();
        }