Exemple #1
0
        /// <summary>
        /// Get vehicle body type for the particular make and model.
        /// e.g for make(BMW) and model(318i) fetch the body type's  SALOON,HATCHBACK..
        /// </summary>
        /// <param name="vehicleMake">Vehicle make.</param>
        /// <param name="vehicleModel">Vehicle model.</param>
        /// <returns>Vehicle body response.</returns>
        public VehicleBodyResponse GetVehicleBody(string vehicleMake, string vehicleModel)
        {
            try
            {
                SqlParameter[] param = new SqlParameter[]
                {
                    new SqlParameter("@Make", vehicleMake),
                    new SqlParameter("@Model", vehicleModel)
                };

                DataSet ds = BKICSQL.eds(StoredProcedures.BKICDropDowns.GetVehicleBody, param);
                return(new VehicleBodyResponse
                {
                    IsTransactionDone = true,
                    VehicleBodydt = ds.Tables[0],
                    VehicleEngineCCdt = ds.Tables[1]
                });
            }
            catch (Exception ex)
            {
                return(new VehicleBodyResponse
                {
                    IsTransactionDone = false,
                    TransactionErrorMessage = ex.Message
                });
            }
        }
Exemple #2
0
 /// <summary>
 /// Get agency product's based on the insurance type.
 /// e.g for the agency SECURA and insurance type MOTOR fetch the product's (Product 1 and Prodcut 2)
 /// for the agency TISCO and insurance type MOTOR fetch the product's (GLD,NMC,PLT etc.)
 /// </summary>
 /// <param name="agency">Agency.</param>
 /// <param name="agencyCode">Agent code.</param>
 /// <param name="mainclass">MainClass(e.g MOTOR product's for SECURA -SECUR for TISCO - TISCO)</param>
 /// <param name="type">Insurance type.</param>
 /// <returns></returns>
 public FetchDropDownsResponse FetchAgencyProducts(string agency, string agencyCode, string mainclass, string type)
 {
     try
     {
         SqlParameter[] param = new SqlParameter[] {
             new SqlParameter("@Agency", agency),
             new SqlParameter("@AgencyCode", agencyCode),
             new SqlParameter("@MainClass", mainclass),
             new SqlParameter("@PageType", type)
         };
         DataSet ds = BKICSQL.eds(DropDownSP.FetchAgencyProducts, param);
         return(new FetchDropDownsResponse
         {
             IsTransactionDone = true,
             dropdownds = ds
         });
     }
     catch (Exception ex)
     {
         return(new FetchDropDownsResponse
         {
             IsTransactionDone = false,
             TransactionErrorMessage = ex.Message
         });
     }
 }
Exemple #3
0
        /// <summary>
        /// Get all the travel endorsement details for the specific policy.
        /// To show the top of the page on any travel endorsement page.
        /// </summary>
        /// <param name="request">Endorsement request.</param>
        /// <returns>list of endorsemnt details.</returns>
        public TravelEndoResponse GetAllEndorsements(TravelEndoRequest request)
        {
            try
            {
                SqlParameter[] paras = new SqlParameter[]
                {
                    new  SqlParameter("@Insurancetype", request.InsuranceType),
                    new  SqlParameter("@Agency", request.Agency),
                    new  SqlParameter("@AgentCode", request.AgentCode),
                    new  SqlParameter("@DocumentNo", request.DocumentNo),
                };
                DataSet travelEndo = BKICSQL.eds(StoredProcedures.PortalSP.GetEndorsementByDocNo, paras);
                List <BO.TravelEndorsement> listEndo = new List <BO.TravelEndorsement>();
                if (travelEndo != null && travelEndo.Tables[0].Rows.Count > 0)
                {
                    foreach (DataRow dr in travelEndo.Tables[0].Rows)
                    {
                        BO.TravelEndorsement result = new BO.TravelEndorsement();

                        result.TravelEndorsementID     = dr.IsNull("TravelEndorsementID") ? 0 : Convert.ToInt64(dr["TravelEndorsementID"]);
                        result.TravelID                = dr.IsNull("TravelID") ? 0 : Convert.ToInt64(dr["TravelID"]);
                        result.DocumentNo              = dr.IsNull("DocumentNo") ? string.Empty : Convert.ToString(dr["DocumentNo"]);
                        result.EndorsementNo           = dr.IsNull("EndorsementNo") ? string.Empty : Convert.ToString(dr["EndorsementNo"]);
                        result.EndorsementType         = dr.IsNull("EndorsementType") ? string.Empty : Convert.ToString(dr["EndorsementType"]);
                        result.PremiumBeforeDiscount   = dr.IsNull("PremiumBeforeDiscount") ? 0 : Convert.ToDecimal(dr["PremiumBeforeDiscount"]);
                        result.PremiumAfterDiscount    = dr.IsNull("PremiumAfterDiscount") ? 0 : Convert.ToDecimal(dr["PremiumAfterDiscount"]);
                        result.CommisionBeforeDiscount = dr.IsNull("CommissionBeforeDiscount") ? 0 : Convert.ToDecimal(dr["CommissionBeforeDiscount"]);
                        result.CommissionAfterDiscount = dr.IsNull("CommissionAfterDiscount") ? 0 : Convert.ToDecimal(dr["CommissionAfterDiscount"]);
                        result.RefundAmount            = dr.IsNull("RefundAmount") ? 0 : Convert.ToDecimal(dr["RefundAmount"]);
                        result.RefundAfterDiscount     = dr.IsNull("RefundAfterDiscount") ? 0 : Convert.ToDecimal(dr["RefundAfterDiscount"]);
                        result.PolicyCommencementDate  = dr.IsNull("COMMENCEDATE") ? DateTime.Now : Convert.ToDateTime(dr["COMMENCEDATE"]);
                        result.ExpiryDate              = dr.IsNull("EXPIRYDATE") ? DateTime.Now : Convert.ToDateTime(dr["EXPIRYDATE"]);
                        result.IsSaved        = dr.IsNull("IsSaved") ? false : Convert.ToBoolean(dr["IsSaved"]);
                        result.IsActivePolicy = dr.IsNull("IsActive") ? false : Convert.ToBoolean(dr["IsActive"]);

                        listEndo.Add(result);
                    }
                }
                return(new TravelEndoResponse
                {
                    TravelEndorsements = listEndo,
                    IsTransactionDone = true
                });
            }
            catch (Exception ex)
            {
                return(new TravelEndoResponse
                {
                    IsTransactionDone = false,
                    TransactionErrorMessage = ex.Message
                });
            }
        }
        public void TrackLogin(LoginAudit audit)
        {
            try
            {
                SqlParameter[] para = new SqlParameter[] {
                    new SqlParameter("@UserName", audit.UserName),
                    new SqlParameter("@IPAddress", audit.IPAddress),
                    new SqlParameter("@LoginDate", audit.LoginDate),
                    new SqlParameter("@LoginStatus", audit.LoginStatus)
                };

                DataSet result = BKICSQL.eds(UsersSP.LoginAudit, para);
            }
            catch (Exception exc)
            {
                throw;
            }
        }
        /// <summary>
        /// Fetch user details by the user name.
        /// </summary>
        /// <param name="userName">User name.</param>
        /// <returns>User details.</returns>
        public UserDetailsResult FetchUserInformation(string userName)
        {
            try
            {
                SqlParameter[] param = new SqlParameter[] {
                    new SqlParameter("@UserName", userName)
                };

                DataSet           ds          = BKICSQL.eds(UsersSP.FetchUserDetails, param);
                UserDetailsResult userdetails = new UserDetailsResult();
                foreach (DataRow dr in ds.Tables[0].Rows)
                {
                    userdetails.UserName       = Convert.ToString(dr["USERNAME"]);
                    userdetails.AgentBranch    = Convert.ToString(dr["AGENTBRANCH"]);
                    userdetails.Agency         = Convert.ToString(dr["AGENCY"]);
                    userdetails.AgentCode      = Convert.ToString(dr["AGENTCODE"]);
                    userdetails.UserID         = Convert.ToString(dr["USERID"]);
                    userdetails.ID             = Convert.ToInt32(dr["ID"]);
                    userdetails.IsShowPayments = Convert.ToBoolean(dr["IsShowPayment"]);
                    //userdetails.AgentLogo = (byte[])dr["Logo"];
                }
                string products = string.Empty;
                foreach (DataRow dr in ds.Tables[1].Rows)
                {
                    products += Convert.ToString(dr["InsuranceTypeID"]);
                    products += ";";
                }
                userdetails.IsTransactionDone = true;
                userdetails.Products          = products;
                return(userdetails);
            }
            catch (Exception ex)
            {
                return(new UserDetailsResult
                {
                    IsTransactionDone = false,
                    TransactionErrorMessage = ex.Message
                });
            }
        }
        /// <summary>
        /// Email audit.
        /// </summary>
        /// <param name="emailMessage"></param>
        public void InsertEmailMessageAudit(EmailMessageAudit emailMessage)
        {
            try
            {
                SqlParameter[] para = new SqlParameter[] {
                    new SqlParameter("@MessageKey", emailMessage.MessageKey),
                    new SqlParameter("@Message", emailMessage.Message),
                    new SqlParameter("@InsuredCode", emailMessage.InsuredCode ?? ""),
                    new SqlParameter("@PolicyNo", emailMessage.PolicyNo ?? ""),
                    new SqlParameter("@LinkId", emailMessage.LinkNo ?? ""),
                    new SqlParameter("@InsuredType", emailMessage.InsuranceType),
                    new SqlParameter("@Subject", emailMessage.Subject ?? ""),
                    new SqlParameter("@Agency", emailMessage.Agency ?? "")
                };

                DataSet result = BKICSQL.eds(StoredProcedures.PortalSP.InsertEmailMessage, para);
            }
            catch (Exception exc)
            {
                var message = exc.Message;
            }
        }
Exemple #7
0
 /// <summary>
 /// Fetch dropdowns by page type.
 /// </summary>
 /// <param name="type">Page type(e.g domestic help page)</param>
 /// <returns>Dropdown response.</returns>
 public FetchDropDownsResponse FetchDropDown(string type)
 {
     try
     {
         SqlParameter[] param = new SqlParameter[] {
             new SqlParameter("@PageType", type)
         };
         DataSet ds = BKICSQL.eds(DropDownSP.FetchDropdowns, param);
         return(new FetchDropDownsResponse
         {
             IsTransactionDone = true,
             dropdownds = ds
         });
     }
     catch (Exception ex)
     {
         return(new FetchDropDownsResponse
         {
             IsTransactionDone = false,
             TransactionErrorMessage = ex.Message
         });
     }
 }
        /// <summary>
        /// Get domestic policy details by document number(policy number)
        /// </summary>
        /// <param name="documentNo">document number</param>
        /// <param name="agentCode">agent code</param>
        /// <param name="isEndorsement">details fetched for endorsement page or policy page.</param>
        /// <param name="endorsementID">endoresment id</param>
        /// <returns></returns>
        public DomesticHelpSavedQuotationResponse GetSavedDomesticPolicy(string documentNo, string agentCode, bool isEndorsement = false, long endorsementID = 0)
        {
            try
            {
                SqlParameter[] para = new SqlParameter[]
                {
                    new SqlParameter("@DocumentNo", documentNo),
                    new SqlParameter("@AgentCode", agentCode)
                };
                DataSet            domesticds = BKICSQL.eds(StoredProcedures.DomesticHelpInsuranceSP.GetSavedQuotationByDocumentNo, para);
                DomesticHelpPolicy domestic   = new DomesticHelpPolicy();

                if (domesticds != null && domesticds.Tables[0].Rows.Count > 0)
                {
                    DataRow dr = domesticds.Tables[0].Rows[0];
                    domestic.DomesticID       = Convert.ToInt64(dr["DOMESTICID"]);
                    domestic.InsurancePeroid  = Convert.ToInt32(dr["INSURANCEPERIOD"]);
                    domestic.AgentBranch      = Convert.ToString(dr["BRANCHCODE"]);
                    domestic.PolicyStartDate  = Convert.ToDateTime(dr["COMMENCEDATE"]);
                    domestic.PolicyExpiryDate = Convert.ToDateTime(dr["EXPIRYDATE"]);
                    domestic.PolicyIssueDate  = Convert.ToDateTime(dr["DATEOFSUBMISSION"]);
                    domestic.CPR                       = Convert.ToString(dr["CPR"]);
                    domestic.FullName                  = Convert.ToString(dr["INSUREDNAME"]);
                    domestic.PremiumAfterDiscount      = dr.IsNull("PREMIUMAMOUNT") ? 0 : Convert.ToDecimal(dr["PREMIUMAMOUNT"]);
                    domestic.PremiumBeforeDiscount     = Convert.ToDecimal(dr["ORIGINALPREMIUMAMOUNT"]);
                    domestic.DocumentNo                = Convert.ToString(dr["DOCUMENTNO"]);
                    domestic.SumInsured                = Convert.ToDecimal(dr["SUMINSURED"]);
                    domestic.InsuredCode               = Convert.ToString(dr["INSUREDCODE"]);
                    domestic.DomesticWorkType          = dr["DomesticWorkerType"].ToString() ?? "";
                    domestic.IsPhysicalDefect          = dr["PhysicalDefect"].ToString() == null ? "" : dr["PhysicalDefect"].ToString();
                    domestic.PhysicalDefectDescription = dr["PhysicalDesc"].ToString() == null ? "" : dr["PhysicalDesc"].ToString();
                    domestic.InsuredCode               = Convert.ToString(dr["INSUREDCODE"]);
                    domestic.IsHIR                     = Convert.ToBoolean(dr["IsHIR"]);
                    domestic.Remarks                   = dr["Remarks"].ToString() == null ? "" : Convert.ToString(dr["Remarks"]);
                    domestic.AccountNumber             = dr["AccountNumber"].ToString() == null ? "" : Convert.ToString(dr["AccountNumber"]);
                    domestic.CommisionBeforeDiscount   = dr.IsNull("CommissionBeforeDiscount") ? 0 : Convert.ToDecimal(dr["CommissionBeforeDiscount"]);
                    domestic.CommissionAfterDiscount   = dr.IsNull("CommissionAfterDiscount") ? 0 : Convert.ToDecimal(dr["CommissionAfterDiscount"]);
                    domestic.CommissionAmount          = dr.IsNull("CommissionAmount") ? 0 : Convert.ToDecimal(dr["CommissionAmount"]);
                    domestic.IsSaved                   = dr.IsNull("IsSaved") ? false : Convert.ToBoolean(dr["IsSaved"]);
                    domestic.IsActivePolicy            = dr.IsNull("IsActive") ? false : Convert.ToBoolean(dr["IsActive"]);
                    domestic.PolicyIssueDate           = Convert.ToDateTime(dr["DATEOFSUBMISSION"]);
                    domestic.PaymentType               = dr["PAYMENTTYPE"].ToString() == null ? "" : Convert.ToString(dr["PAYMENTTYPE"]);
                    domestic.HIRStatus                 = dr.IsNull("HIRStatus") ? 0 : Convert.ToInt32(dr["HIRStatus"]);
                    domestic.TaxOnPremium              = dr.IsNull("TaxOnPremium") ? 0 : Convert.ToDecimal(dr["TaxOnPremium"]);
                    domestic.TaxOnCommission           = dr.IsNull("TaxOnCommission") ? 0 : Convert.ToDecimal(dr["TaxOnCommission"]);
                }

                List <DomesticHelpMember> membersList = new List <DomesticHelpMember>();

                if (domesticds != null && domesticds.Tables[1].Rows.Count > 0)
                {
                    domestic.NoOfDomesticWorkers = domesticds.Tables[1].Rows.Count;
                    foreach (DataRow dr in domesticds.Tables[1].Rows)
                    {
                        DomesticHelpMember members = new DomesticHelpMember();
                        members.InsuredCode      = Convert.ToString(dr["INSUREDCODE"]);
                        members.SumInsured       = Convert.ToDecimal(dr["SUMINSURED"]);
                        members.PremiumAmount    = Convert.ToDecimal(dr["PREMIUMAMOUNT"]);
                        members.OtherOccupation  = Convert.ToString(dr["OCCUPATIONOTHER"]);
                        members.CommencementDate = Convert.ToDateTime(dr["COMMENCEDATE"]);
                        members.ExpiryDate       = Convert.ToDateTime(dr["EXPIRYDATE"]);
                        members.Name             = Convert.ToString(dr["INSUREDNAME"]);
                        members.Sex          = Convert.ToChar(dr["SEX"]);
                        members.DOB          = Convert.ToDateTime(dr["DOB"]);
                        members.Nationality  = Convert.ToString(dr["NATIONALITY"]);
                        members.CPRNumber    = Convert.ToString(dr["IDENTITYNO"]);
                        members.Occupation   = Convert.ToString(dr["OCCUPATION"]);
                        members.ItemserialNo = Convert.ToInt32(dr["ITEMSERIALNO"]);
                        members.AddressType  = Convert.ToString(dr["ADDRESS1"]);
                        members.Passport     = Convert.ToString(dr["Passport"]);
                        membersList.Add(members);
                    }
                }
                return(new DomesticHelpSavedQuotationResponse
                {
                    IsTransactionDone = true,
                    DomesticHelp = domestic,
                    DomesticHelpMemberList = membersList
                });
            }
            catch (Exception ex)
            {
                return(new DomesticHelpSavedQuotationResponse
                {
                    IsTransactionDone = false,
                    TransactionErrorMessage = ex.Message
                });
            }
        }
        /// <summary>
        /// Get the domestic policy details by domestic id.
        /// </summary>
        /// <param name="domesticID">doemstic id</param>
        /// <param name="insuredCode">insured code</param>
        /// <returns></returns>
        public DomesticHelpSavedQuotationResponse GetSavedDomesticHelp(int domesticID, string insuredCode)
        {
            try
            {
                SqlParameter[] para = new SqlParameter[]
                {
                    new SqlParameter("@DomesticID", domesticID),
                    new SqlParameter("@InsuredCode", insuredCode)
                };

                DataSet            domesticds = BKICSQL.eds(StoredProcedures.DomesticHelpInsuranceSP.SavedQuotation, para);
                DomesticHelpPolicy domestic   = new DomesticHelpPolicy();
                if (domesticds != null && domesticds.Tables[0].Rows.Count > 0)
                {
                    DataRow dr = domesticds.Tables[0].Rows[0];
                    domestic.DomesticID       = domesticID;
                    domestic.InsurancePeroid  = Convert.ToInt32(dr["INSURANCEPERIOD"]);
                    domestic.PolicyStartDate  = Convert.ToDateTime(dr["COMMENCEDATE"]);
                    domestic.PolicyExpiryDate = Convert.ToDateTime(dr["EXPIRYDATE"]);
                    domestic.CPR                       = Convert.ToString(dr["CPR"]);
                    domestic.FullName                  = Convert.ToString(dr["INSUREDNAME"]);
                    domestic.PremiumAfterDiscount      = Convert.ToDecimal(dr["PREMIUMAMOUNT"]);
                    domestic.PremiumBeforeDiscount     = Convert.ToDecimal(dr["ORIGINALPREMIUMAMOUNT"]);
                    domestic.DocumentNo                = Convert.ToString(dr["DOCUMENTNO"]);
                    domestic.SumInsured                = Convert.ToDecimal(dr["SUMINSURED"]);
                    domestic.InsuredCode               = Convert.ToString(dr["INSUREDCODE"]);
                    domestic.DomesticWorkType          = dr["DomesticWorkerType"].ToString() == null ? "" : dr["DomesticWorkerType"].ToString();
                    domestic.IsPhysicalDefect          = dr["PhysicalDefect"].ToString() == null ? "" : dr["PhysicalDefect"].ToString();
                    domestic.PhysicalDefectDescription = dr["PhysicalDesc"].ToString() == null ? "" : dr["PhysicalDesc"].ToString();
                    domestic.InsuredCode               = insuredCode;
                    domestic.IsHIR                     = Convert.ToBoolean(dr["IsHIR"]);
                }

                List <DomesticHelpMember> membersList = new List <DomesticHelpMember>();
                if (domesticds != null && domesticds.Tables[1].Rows.Count > 0)
                {
                    domestic.NoOfDomesticWorkers = domesticds.Tables[1].Rows.Count;
                    foreach (DataRow dr in domesticds.Tables[1].Rows)
                    {
                        DomesticHelpMember members = new DomesticHelpMember();
                        members.InsuredCode     = Convert.ToString(dr["INSUREDCODE"]);
                        members.SumInsured      = Convert.ToDecimal(dr["SUMINSURED"]);
                        members.PremiumAmount   = Convert.ToDecimal(dr["PREMIUMAMOUNT"]);
                        members.OtherOccupation = Convert.ToString(dr["OCCUPATIONOTHER"]);
                        // members.DateOfSubmission = Convert.ToDateTime(dr["DATEOFSUBMISSION"]);
                        members.CommencementDate = Convert.ToDateTime(dr["COMMENCEDATE"]);
                        members.ExpiryDate       = Convert.ToDateTime(dr["EXPIRYDATE"]);
                        members.Name             = Convert.ToString(dr["INSUREDNAME"]);
                        members.Sex          = Convert.ToChar(dr["SEX"]);
                        members.DOB          = Convert.ToDateTime(dr["DOB"]);
                        members.Nationality  = Convert.ToString(dr["NATIONALITY"]);
                        members.CPRNumber    = Convert.ToString(dr["IDENTITYNO"]);
                        members.Occupation   = Convert.ToString(dr["OCCUPATION"]);
                        members.ItemserialNo = Convert.ToInt32(dr["ITEMSERIALNO"]);
                        members.AddressType  = Convert.ToString(dr["ADDRESS1"]);
                        members.Passport     = Convert.ToString(dr["Passport"]);
                        membersList.Add(members);
                    }
                }
                return(new DomesticHelpSavedQuotationResponse
                {
                    IsTransactionDone = true,
                    DomesticHelp = domestic,
                    DomesticHelpMemberList = membersList
                });
            }
            catch (Exception ex)
            {
                return(new DomesticHelpSavedQuotationResponse
                {
                    IsTransactionDone = false,
                    TransactionErrorMessage = ex.Message
                });
            }
        }
Exemple #10
0
        public DropDownResult GetPageDropDowns(string pageName)
        {
            try
            {
                SqlParameter[] para = new SqlParameter[] {
                    new SqlParameter("@PageType", pageName)
                };

                DataSet result = BKICSQL.eds(StoredProcedures.BKICDropDowns.GetPageDropDowns, para);

                if (pageName == PageType.Profile || pageName == PageType.TravelInsurance)
                {
                    DataTable userTitle = new DataTable();
                    userTitle.Columns.Add("Value");
                    userTitle.Columns.Add("Text");
                    userTitle.Rows.Add("MR", "MR");
                    userTitle.Rows.Add("MRS", "MRS");
                    userTitle.Rows.Add("MISS", "MISS");

                    DataTable userGender = new DataTable();
                    userGender.Columns.Add("Value");
                    userGender.Columns.Add("Text");
                    userGender.Rows.Add("M", "Male");
                    userGender.Rows.Add("F", "Female");

                    result.Tables.Add(userTitle);
                    result.Tables.Add(userGender);
                }

                if (pageName == PageType.MotorQuote || pageName == PageType.MotorInsurance)
                {
                    DataTable motorType = new DataTable();
                    motorType.Columns.Add("Value");
                    motorType.Columns.Add("Text");
                    motorType.Rows.Add("NEW", "New Vehicle");
                    motorType.Rows.Add("USED", "Used Vehicle");

                    result.Tables.Add(motorType);


                    DataTable months = new DataTable();
                    months.Columns.Add("Months");
                    months.Rows.Add("January");
                    months.Rows.Add("February");
                    months.Rows.Add("March");
                    months.Rows.Add("April");
                    months.Rows.Add("May");
                    months.Rows.Add("June");
                    months.Rows.Add("July");
                    months.Rows.Add("August");
                    months.Rows.Add("September");
                    months.Rows.Add("October");
                    months.Rows.Add("November");
                    months.Rows.Add("December");
                    result.Tables.Add(months);

                    if (pageName == PageType.MotorInsurance)
                    {
                        DataTable deliveryOptions = new DataTable();
                        deliveryOptions.Columns.Add("Value");
                        deliveryOptions.Columns.Add("Text");
                        deliveryOptions.Rows.Add("BRANCH", "Branch");
                        deliveryOptions.Rows.Add("ADDRESS", "Deliver to address");

                        result.Tables.Add(deliveryOptions);

                        DataTable deliveryAddressOptions = new DataTable();
                        deliveryAddressOptions.Columns.Add("Value");
                        deliveryAddressOptions.Columns.Add("Text");
                        deliveryAddressOptions.Rows.Add("Same Address", "Same Address");
                        deliveryAddressOptions.Rows.Add("Different Address", "Different Address");

                        result.Tables.Add(deliveryAddressOptions);
                        DataTable CarReplacementDays = new DataTable();
                        CarReplacementDays.Columns.Add("Value");
                        CarReplacementDays.Columns.Add("Text");
                        CarReplacementDays.Rows.Add("7", "7 days");
                        CarReplacementDays.Rows.Add("14", "14 days");

                        result.Tables.Add(CarReplacementDays);
                    }
                }

                if (pageName == PageType.HomeQuote || pageName == PageType.HomeInsurance)
                {
                    DataTable propertyInsured = new DataTable();
                    propertyInsured.Columns.Add("Value");
                    propertyInsured.Columns.Add("Text");
                    propertyInsured.Rows.Add("1", "Yes");
                    propertyInsured.Rows.Add("0", "No");
                    result.Tables.Add(propertyInsured);

                    DataTable maliciousCover = new DataTable();
                    maliciousCover.Columns.Add("Value");
                    maliciousCover.Columns.Add("Text");
                    maliciousCover.Rows.Add("1", "Yes");
                    maliciousCover.Rows.Add("0", "No");
                    result.Tables.Add(maliciousCover);

                    DataTable helpCover = new DataTable();
                    helpCover.Columns.Add("Value");
                    helpCover.Columns.Add("Text");
                    helpCover.Rows.Add("1", "Yes");
                    helpCover.Rows.Add("0", "No");
                    result.Tables.Add(helpCover);

                    DataTable workersCover = new DataTable();
                    workersCover.Columns.Add("Value");
                    workersCover.Columns.Add("Text");
                    workersCover.Rows.Add("1", "1");
                    workersCover.Rows.Add("2", "2");
                    workersCover.Rows.Add("3", "3");
                    workersCover.Rows.Add("4", "4");
                    workersCover.Rows.Add("5", "5");
                    workersCover.Rows.Add("6", "6");
                    workersCover.Rows.Add("7", "7");
                    workersCover.Rows.Add("8", "8");
                    workersCover.Rows.Add("9", "9");
                    workersCover.Rows.Add("10", "10");
                    result.Tables.Add(workersCover);

                    if (pageName == PageType.HomeInsurance)
                    {
                        DataTable yesOrNo = new DataTable();
                        yesOrNo.Columns.Add("Value");
                        yesOrNo.Columns.Add("Text");
                        yesOrNo.Rows.Add("yes", "Yes");
                        yesOrNo.Rows.Add("no", "No");
                        result.Tables.Add(yesOrNo);

                        DataTable buildingAge = new DataTable();
                        buildingAge.Columns.Add("Value");
                        buildingAge.Columns.Add("Text");
                        buildingAge.Rows.Add("1", "1");
                        buildingAge.Rows.Add("2", "2");
                        buildingAge.Rows.Add("3", "3");
                        buildingAge.Rows.Add("4", "4");
                        buildingAge.Rows.Add("5", "5");
                        buildingAge.Rows.Add("6", "6");
                        buildingAge.Rows.Add("7", "7");
                        buildingAge.Rows.Add("8", "8");
                        buildingAge.Rows.Add("9", "9");
                        buildingAge.Rows.Add("10", "10");
                        buildingAge.Rows.Add("11", "11");
                        buildingAge.Rows.Add("12", "12");
                        buildingAge.Rows.Add("13", "13");
                        buildingAge.Rows.Add("14", "14");
                        buildingAge.Rows.Add("15", "15");
                        buildingAge.Rows.Add("16", "16");
                        buildingAge.Rows.Add("17", "17");
                        buildingAge.Rows.Add("18", "18");
                        buildingAge.Rows.Add("19", "19");
                        buildingAge.Rows.Add("20", "20");
                        buildingAge.Rows.Add("21", "20+");
                        result.Tables.Add(buildingAge);

                        DataTable residentialType = new DataTable();
                        residentialType.Columns.Add("Value");
                        residentialType.Columns.Add("Text");
                        residentialType.Rows.Add("H", "Residential Villa");
                        residentialType.Rows.Add("F", "Residential Flat/Apartment");
                        result.Tables.Add(residentialType);
                    }
                }
                if (pageName == PageType.DomesticHelp)
                {
                    DataTable domesticInsuranceYears = new DataTable();
                    domesticInsuranceYears.Columns.Add("Value");
                    domesticInsuranceYears.Columns.Add("Text");
                    domesticInsuranceYears.Rows.Add("1", "1");
                    domesticInsuranceYears.Rows.Add("2", "2");
                    result.Tables.Add(domesticInsuranceYears);

                    DataTable domesticHelpWorkers = new DataTable();
                    domesticHelpWorkers.Columns.Add("Value");
                    domesticHelpWorkers.Columns.Add("Text");
                    domesticHelpWorkers.Rows.Add("1", "1");
                    domesticHelpWorkers.Rows.Add("2", "2");
                    domesticHelpWorkers.Rows.Add("3", "3");
                    domesticHelpWorkers.Rows.Add("4", "4");
                    domesticHelpWorkers.Rows.Add("5", "5");
                    domesticHelpWorkers.Rows.Add("6", "6");
                    domesticHelpWorkers.Rows.Add("7", "7");
                    domesticHelpWorkers.Rows.Add("8", "8");
                    domesticHelpWorkers.Rows.Add("9", "9");
                    domesticHelpWorkers.Rows.Add("10", "10");
                    result.Tables.Add(domesticHelpWorkers);

                    DataTable domesticHelpWorkersType = new DataTable();
                    domesticHelpWorkersType.Columns.Add("Value");
                    domesticHelpWorkersType.Columns.Add("Text");
                    domesticHelpWorkersType.Rows.Add("Domestic", "Domestic");
                    domesticHelpWorkersType.Rows.Add("Business", "Business");
                    result.Tables.Add(domesticHelpWorkersType);

                    DataTable userGender = new DataTable();
                    userGender.Columns.Add("Value");
                    userGender.Columns.Add("Text");
                    userGender.Rows.Add("M", "Male");
                    userGender.Rows.Add("F", "Female");
                    result.Tables.Add(userGender);
                }

                return(new DropDownResult()
                {
                    IsTransactionDone = true,
                    DataSets = result
                });
            }
            catch (Exception exc)
            {
                return(new DropDownResult()
                {
                    IsTransactionDone = false,
                    TransactionErrorMessage = exc.Message
                });
            }
        }