/// <summary> /// Gets the policy ID from policy number. /// </summary> /// <param name="vm">The vm.</param> /// <returns>Returns Policy ID.</returns> private string GetPolicyIDFromPolicyNumber() { string PolicyId = string.Empty; vm.SqlQuery = ConfigurationManager.AppSettings["POLICYTABQuery"]; Mapper.MapPrintInitialDataToDataModel(vm, this.logDataModel); GetExceedData.GetPolicyTabDetails(this.logDataModel); if (this.logDataModel.dataSet.Tables["POLICY_TAB"] != null) { var PolicyTabDetails = this.logDataModel.dataSet.Tables["POLICY_TAB"].AsEnumerable(); PolicyId = (from row in PolicyTabDetails select row.Field <string>("POLICY_ID")).FirstOrDefault().Trim(); } return(PolicyId); }
/// <summary> /// Gets the LOB code. /// </summary> public void GetLOBCode() { string PolicyId = string.Empty; if (this.logDataModel.dataSet.Tables["POLICY_TAB"] != null) { var PolicyTabQuery = this.logDataModel.dataSet.Tables["POLICY_TAB"].AsEnumerable(); PolicyId = (from row in PolicyTabQuery select row.Field <string>("POLICY_ID")).FirstOrDefault().Trim(); } if (this.logDataModel.dataSet.Tables["POLICY_TAB"] == null || !string.Equals(this.logDataModel.PolicyId, PolicyId)) { vm.SqlQuery = ConfigurationManager.AppSettings["LOBCDQuery"]; Mapper.MapPrintLOBCDQueryToDataModel(vm, this.logDataModel); GetExceedData.GetPolicyTabDetails(this.logDataModel); } var PolicyTab = this.logDataModel.dataSet.Tables["POLICY_TAB"].AsEnumerable(); vm.LOBCD = (from row in PolicyTab select row.Field <string>("LOB_CD")).FirstOrDefault().Trim(); vm.MasterCompanyNbr = (from row in PolicyTab select row.Field <string>("MASTER_COMPANY_NBR")).FirstOrDefault().Trim(); Mapper.MapLOBCode(vm, this.logDataModel); }