示例#1
0
        public ActionResult NewCustomerStorageAndForceFeeSettlement(CustomerStorageAndForceFeeSettlementViewModel model)
        {
            if (ModelState.IsValid)
            {
                //创建数据
                CustomerStorageAndForceFeeSettlement data = new CustomerStorageAndForceFeeSettlement();
                data.StartTime = DateTime.Parse(model.StartTime);
                data.EndTime = DateTime.Parse(model.EndTime);
                data.InvoiceNo = model.InvoiceNo;
                data.CustomerId = model.CustomerId;
                data.CustomerName = model.CustomerName;
                data.InvoiceType = model.InvoiceType;
                data.InvoiceAmount = model.InvoiceAmount;
                data.Remark = model.Remark;

                //保存数据
                string strErrText;
                StockSystem stock = new StockSystem();
                if (stock.InsertCustomerStorageAndForceFeeSettlement(data, LoginAccountId, LoginStaffName, out strErrText) > 0)
                {
                    return Json(string.Empty);
                }
                else
                {
                    return Json(strErrText);
                }
            }
            return View(model);
        }