public void SetSearchType(AdminFetchHomeDetailsRequest req) { if (!string.IsNullOrEmpty(txtSearchKey.Text.Trim())) { ddlAgency.SelectedIndex = 0; req.ByDocumentNo = true; } if (ddlAgency.SelectedIndex > 0) { req.ByAgencyCode = true; } }
protected void btnSearch_Click(object sender, EventArgs e) { try { master.IsSessionAvailable(); var userInfo = CommonMethods.GetUserDetails(); var service = CommonMethods.GetLogedInService(); var fetchdetailsrequest = new AdminFetchHomeDetailsRequest { DocumentNo = txtSearchKey.Text.Trim(), Type = "HIR", AgencyCode = ddlAgency.SelectedItem.Value, HIRStatus = string.IsNullOrEmpty(ddlStatus.SelectedItem.Value) ? 0 : Convert.ToInt32(ddlStatus.SelectedItem.Value) }; if (string.IsNullOrEmpty(fetchdetailsrequest.DocumentNo) && string.IsNullOrEmpty(fetchdetailsrequest.AgencyCode) && fetchdetailsrequest.HIRStatus == 0) { LoadData(userInfo, service); } else { var result = service.PostData <BKIC.SellingPoint.DTO.RequestResponseWrappers.ApiResponseWrapper <BKIC.SellingPoint.DTO.RequestResponseWrappers.AdminFetchHomeDetailsResponse>, BKIC.SellingPoint.DTO.RequestResponseWrappers.AdminFetchHomeDetailsRequest> (BKIC.SellingPoint.DTO.Constants.AdminURI.FetchHomePolicyDetails, fetchdetailsrequest); if (result.StatusCode == 200 && result.Result.IsTransactionDone) { gvHomeInsurance.DataSource = result.Result.HomeDetails; gvHomeInsurance.DataBind(); } } } catch (Exception ex) { ////throw ex; } finally { master.ShowLoading = false; } }
public void LoadData(OAuthTokenResponse userInfo, DataServiceManager service) { var fetchdetailsrequest = new AdminFetchHomeDetailsRequest { DocumentNo = "", Type = "HIR", AgencyCode = ddlAgency.SelectedItem.Value, All = true }; var result = service.PostData <BKIC.SellingPoint.DTO.RequestResponseWrappers.ApiResponseWrapper <BKIC.SellingPoint.DTO.RequestResponseWrappers.AdminFetchHomeDetailsResponse>, BKIC.SellingPoint.DTO.RequestResponseWrappers.AdminFetchHomeDetailsRequest> (BKIC.SellingPoint.DTO.Constants.AdminURI.FetchHomePolicyDetails, fetchdetailsrequest); if (result.StatusCode == 200 && result.Result.IsTransactionDone) { gvHomeInsurance.DataSource = result.Result.HomeDetails; gvHomeInsurance.DataBind(); } }
protected void btnSearch_Click(object sender, EventArgs e) { try { master.IsSessionAvailable(); var service = CommonMethods.GetLogedInService(); var fetchdetailsrequest = new AdminFetchHomeDetailsRequest { DocumentNo = txtSearchKey.Text.Trim(), HIRStatus = 0, Type = "Active", AgencyCode = string.Empty }; if (ddlAgency.SelectedIndex > 0) { fetchdetailsrequest.AgencyCode = ddlAgency.SelectedItem.Value; } var result = service.PostData <BKIC.SellingPoint.DTO.RequestResponseWrappers.ApiResponseWrapper <BKIC.SellingPoint.DTO.RequestResponseWrappers.AdminFetchHomeDetailsResponse>, BKIC.SellingPoint.DTO.RequestResponseWrappers.AdminFetchHomeDetailsRequest> (BKIC.SellingPoint.DTO.Constants.AdminURI.FetchHomePolicyDetails, fetchdetailsrequest); if (result.StatusCode == 200 && result.Result.IsTransactionDone) { gvHomeInsurance.DataSource = result.Result.HomeDetails; gvHomeInsurance.DataBind(); } } catch (Exception ex) { ////throw ex; } finally { master.ShowLoading = false; } }
public void loadd() { master.IsSessionAvailable(); var service = CommonMethods.GetLogedInService(); var fetchdetailsrequest = new AdminFetchHomeDetailsRequest { DocumentNo = "", Type = "Active", AgencyCode = ddlAgency.SelectedItem.Value, All = true }; var result = service.PostData <BKIC.SellingPoint.DTO.RequestResponseWrappers.ApiResponseWrapper <BKIC.SellingPoint.DTO.RequestResponseWrappers.AdminFetchHomeDetailsResponse>, BKIC.SellingPoint.DTO.RequestResponseWrappers.AdminFetchHomeDetailsRequest> (BKIC.SellingPoint.DTO.Constants.AdminURI.FetchHomePolicyDetails, fetchdetailsrequest); if (result.StatusCode == 200 && result.Result.IsTransactionDone) { gvHomeInsurance.DataSource = result.Result.HomeDetails; gvHomeInsurance.DataBind(); } }