示例#1
0
        public IApplication Create(string appId,
                                   string customerId, string customerName, string customerSex, string customerPhone, string customerAddress,
                                   string region, DateTime?dateApplied, DateTime?dateTraved, string offNoteNo, DateTime?offNoteDate, string remark)
        {
            ICustomer customer;

            if (CustomerBLL.IsExisting(customerId))
            {
                customer = CustomerBLL.Get(customerId);
                customer = CustomerBLL.Update(customer, customerId, customerName, customerSex, customerPhone,
                                              customerAddress);
            }
            else
            {
                customer = CustomerBLL.Create(customerId, customerName, customerSex, customerPhone,
                                              customerAddress);
            }

            IApplication app = ApplicationBLL.Create(appId, customer.ID, region, dateApplied, dateTraved, offNoteNo,
                                                     offNoteDate,
                                                     remark);
            IStatus status = StatusBLL.Create(appId, JobStatus.None.ToLabel());

            return(app);
        }