public void GetPersonLicense() { LicenseBiz biz = new LicenseBiz(); this.MasterLicense.CurrentExpiredLicneseList.Clear(); //ต่ออายุก่อนหมดอายุ 60วัน if (this.MasterLicense.Menu.Equals(2)) { DTO.ResponseService <DTO.PersonLicenseTransaction[]> res = biz.GetRenewLicneseByIdCard(this.MasterLicense.UserProfile.IdCard); if (res.DataResponse != null) { gvRenewLicense.DataSource = res.DataResponse; gvRenewLicense.DataBind(); } else if (res.IsError) { this.MasterLicense.UCLicenseUCLicenseModelError.ShowMessageError = res.ErrorMsg; this.MasterLicense.UCLicenseUCLicenseModelError.ShowModalError(); } } //หมดอายุขอต่อใหม่ else if (this.MasterLicense.Menu.Equals(3)) { DTO.ResponseService <DTO.PersonLicenseTransaction[]> res = biz.GetExpiredLicneseByIdCard(this.MasterLicense.UserProfile.IdCard); if (res.DataResponse != null) { this.MasterLicense.CurrentExpiredLicneseList = res.DataResponse.ToList(); gvRenewLicense.DataSource = res.DataResponse; gvRenewLicense.DataBind(); } else if (res.IsError) { this.MasterLicense.UCLicenseUCLicenseModelError.ShowMessageError = res.ErrorMsg; this.MasterLicense.UCLicenseUCLicenseModelError.ShowModalError(); } } }