示例#1
0
        public Response CreateCustomerClass(string line_of_business, string policy_type, string vehicle_type, string zone,
                                            string country, string channel, string supervisor, int supervisor_code, string custclass, string GpProductID)
        {
            RMCustomerClass rmcustclass = new RMCustomerClass();
            AccountBuilder  aBuilder    = new AccountBuilder();
            Response        response;
            Customers       custom = new Customers();

            string taxid      = ConfigKey.ReadSetting("TAXID");
            string accountREC = ConfigKey.ReadSetting("IDREC");
            string company    = ConfigKey.ReadSetting("Company");

            try
            {
                rmcustclass.CLASSID             = custclass;
                rmcustclass.CLASDSCR            = custclass;
                rmcustclass.CRLMTTYP            = 1;
                rmcustclass.TAXSCHID            = taxid;
                rmcustclass.STMTCYCL            = 5;
                rmcustclass.CUSTPRIORITY        = 1;
                rmcustclass.ORDERFULFILLDEFAULT = 1;
                rmcustclass.ACCTRECACCT         = aBuilder.BuildARAccount(Convert.ToInt32(accountREC), line_of_business, policy_type, vehicle_type, country, channel, supervisor, supervisor_code, GpProductID);

                response = custom.CreateCustomerClass(rmcustclass, company);
                return(response);
            }
            catch (Exception ex)
            {
                log.LogExeption("Ocurrió un error: ", 2, ex);
                throw;
            }
        }