コード例 #1
0
 public void SetSearchType(AdminFetchDomesticDetailsRequest req)
 {
     if (!string.IsNullOrEmpty(txtSearchKey.Text.Trim()))
     {
         ddlAgency.SelectedIndex = 0;
         req.ByDocumentNo        = true;
     }
     if (ddlAgency.SelectedIndex > 0)
     {
         req.ByAgencyCode = true;
     }
 }
コード例 #2
0
        protected void btnSearch_Click(object sender, EventArgs e)
        {
            try
            {
                master.IsSessionAvailable();
                var userInfo = CommonMethods.GetUserDetails();
                var service  = CommonMethods.GetLogedInService();

                var fetchdetailsrequest = new AdminFetchDomesticDetailsRequest
                {
                    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.AdminFetchDomesticDetailsResponse>,
                                                   BKIC.SellingPoint.DTO.RequestResponseWrappers.AdminFetchDomesticDetailsRequest>
                                     (BKIC.SellingPoint.DTO.Constants.AdminURI.FetchDomesticPolicyDetails, fetchdetailsrequest);

                    if (result.StatusCode == 200 && result.Result.IsTransactionDone)
                    {
                        gvDomesticInsurance.DataSource = result.Result.DomesticDetails;
                        gvDomesticInsurance.DataBind();
                    }
                }
            }
            catch (Exception ex)
            {
                ////throw ex;
            }
            finally
            {
                master.ShowLoading = false;
            }
        }
コード例 #3
0
        public void LoadData(OAuthTokenResponse userInfo, DataServiceManager service)
        {
            var fetchdetailsrequest = new AdminFetchDomesticDetailsRequest();

            fetchdetailsrequest.DocumentNo = "";
            fetchdetailsrequest.Type       = "HIR";
            fetchdetailsrequest.AgencyCode = ddlAgency.SelectedItem.Value.Trim();
            fetchdetailsrequest.All        = true;

            var result = service.PostData <BKIC.SellingPoint.DTO.RequestResponseWrappers.ApiResponseWrapper
                                           <BKIC.SellingPoint.DTO.RequestResponseWrappers.AdminFetchDomesticDetailsResponse>,
                                           BKIC.SellingPoint.DTO.RequestResponseWrappers.AdminFetchDomesticDetailsRequest>
                             (BKIC.SellingPoint.DTO.Constants.AdminURI.FetchDomesticPolicyDetails, fetchdetailsrequest);

            if (result.StatusCode == 200 && result.Result.IsTransactionDone)
            {
                gvDomesticInsurance.DataSource = result.Result.DomesticDetails;
                gvDomesticInsurance.DataBind();
            }
        }
コード例 #4
0
        public void loadd()
        {
            var service = CommonMethods.GetLogedInService();

            var fetchdetailsrequest = new AdminFetchDomesticDetailsRequest();

            fetchdetailsrequest.AgencyCode = ddlAgency.SelectedItem.Value.Trim();
            fetchdetailsrequest.DocumentNo = "";
            fetchdetailsrequest.Type       = "Active";
            fetchdetailsrequest.All        = true;

            var result = service.PostData <BKIC.SellingPoint.DTO.RequestResponseWrappers.ApiResponseWrapper
                                           <BKIC.SellingPoint.DTO.RequestResponseWrappers.AdminFetchDomesticDetailsResponse>,
                                           BKIC.SellingPoint.DTO.RequestResponseWrappers.AdminFetchDomesticDetailsRequest>
                             (BKIC.SellingPoint.DTO.Constants.AdminURI.FetchDomesticPolicyDetails, fetchdetailsrequest);


            if (result.StatusCode == 200 && result.Result.IsTransactionDone)
            {
                gvDomesticInsurance.DataSource = result.Result.DomesticDetails;
                gvDomesticInsurance.DataBind();
            }
        }
コード例 #5
0
        protected void btnSearch_Click(object sender, EventArgs e)
        {
            try
            {
                var service             = CommonMethods.GetLogedInService();
                var fetchdetailsrequest = new AdminFetchDomesticDetailsRequest
                {
                    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.AdminFetchDomesticDetailsResponse>,
                                               BKIC.SellingPoint.DTO.RequestResponseWrappers.AdminFetchDomesticDetailsRequest>
                                 (BKIC.SellingPoint.DTO.Constants.AdminURI.FetchDomesticPolicyDetails, fetchdetailsrequest);

                if (result.StatusCode == 200 && result.Result.IsTransactionDone)
                {
                    gvDomesticInsurance.DataSource = result.Result.DomesticDetails;
                    gvDomesticInsurance.DataBind();
                }
            }
            catch (Exception ex)
            {
                ////throw ex;
            }
            finally
            {
                master.ShowLoading = false;
            }
        }