private bool DoAdd() { bool result = false; Model.Order model = new Model.Order(); BLL.Order bll = new BLL.Order(); model.Code = "No" + DateTime.Now.ToString("yyyyMMddhhmmss"); model.AcceptOrderTime = Convert.ToDateTime(txtAcceptOrderTime.Text.Trim()); model.ArrivedTime = Convert.ToDateTime(txtArrivedTime.Text.Trim()); model.Shipper = ddlShipper.SelectedItem.Text; model.ShipperLinkMan = txtShipperLinkMan.Text.Trim(); model.ShipperLinkTel = txtShipperLinkTel.Text.Trim(); model.Receiver = ddlReceiver.SelectedItem.Text; model.ReceiverLinkMan = txtReceiverLinkMan.Text.Trim(); model.ReceiverLinkTel = txtReceiverLinkTel.Text.Trim(); model.ContractNumber = txtContractNumber.Text.Trim(); model.LoadingAddress = ddlLoadingAddress.SelectedItem.Text; model.UnloadingAddress = ddlUnloadingAddress.SelectedItem.Text; model.Goods = ddlGoods.SelectedItem.Text; model.Unit = txtUnit.Text.Trim(); model.IsCharteredCar = chkIsCharteredCar.Checked ? 1 : 0; model.Quantity = Convert.ToDecimal(txtQuantity.Text.Trim()); model.DispatchedCount = 0.00M; model.Haulway = ddlHaulway.SelectedItem.Text; model.LoadingCapacityRunning = Convert.ToDecimal(txtLoadingCapacityRunning.Text.Trim()); model.NoLoadingCapacityRunning = Convert.ToDecimal(txtNoLoadingCapacityRunning.Text.Trim()); model.BillNumber = txtBillNumber.Text.Trim(); model.WeighbridgeNumber = txtWeighbridgeNumber.Text.Trim(); model.Formula = ddlFormula.SelectedItem.Text; model.UnitPrice = Convert.ToDecimal(txtUnitPrice.Text.Trim()); model.TotalPrice = Convert.ToDecimal(txtTotalPrice.Text.Trim()); model.SettleAccountsWay = ddlSettleAccountsWay.SelectedValue; model.Status = 0; model.Remarks = txtRemarks.Text.Trim(); if (bll.Add(model) > 0) { AddAdminLog(DTEnums.ActionEnum.Add.ToString(), "添加订单:" + model.Code); //记录日志 result = true; } return(result); }
private bool DoAdd() { bool result = false; Model.Order model = new Model.Order(); BLL.Order bll = new BLL.Order(); model.TransportOrderId = this.transportOrderId; model.Code = string.Format("No{0}", DateTime.Now.ToString("yyyyMMddhhmmss")); model.AcceptOrderTime = Convert.ToDateTime(txtAcceptOrderTime.Text.Trim()); model.ArrivedTime = Convert.ToDateTime(txtArrivedTime.Text.Trim()); model.ContractNumber = txtContractNumber.Text.Trim(); model.BillNumber = txtBillNumber.Text.Trim(); model.WeighbridgeNumber = txtWeighbridgeNumber.Text.Trim(); model.IsCharteredCar = chkIsCharteredCar.Checked ? 1 : 0; model.Quantity = Convert.ToDecimal(txtQuantity.Text.Trim()); model.IsWeightNote = chkIsWeightNote.Checked; model.IsAllotted = chkIsAllotted.Checked; model.UnitPrice = Convert.ToDecimal(txtUnitPrice.Text.Trim()); model.Weight = Convert.ToDecimal(txtWeight.Text.Trim()); model.Freight = Convert.ToDecimal(txtFreight.Text.Trim()); model.PaidFreight = Convert.ToDecimal(txtPaidFreight.Text.Trim()); model.UnpaidFreight = Convert.ToDecimal(txtUnpaidFreight.Text.Trim()); model.HandlingCharge = Convert.ToDecimal(txtHandlingCharge.Text.Trim()); model.LoadingAddress = ddlLoadingAddress.SelectedItem.Text; model.UnloadingAddress = ddlUnloadingAddress.SelectedItem.Text; model.ShipperId = Convert.ToInt32(ddlShipper.SelectedValue); model.ReceiverId = Convert.ToInt32(ddlReceiver.SelectedValue); model.Haulway = ddlHaulway.SelectedItem.Text; model.LoadingCapacityRunning = Convert.ToDecimal(txtLoadingCapacityRunning.Text.Trim()); model.NoLoadingCapacityRunning = Convert.ToDecimal(txtNoLoadingCapacityRunning.Text.Trim()); model.GoodsId = Convert.ToInt32(ddlGoods.SelectedValue); model.Status = 0; model.Remarks = txtRemarks.Text.Trim(); model.CreateDateTime = DateTime.Now; if (bll.Add(model) > 0) { AddAdminLog(DTEnums.ActionEnum.Add.ToString(), "添加订单:" + model.Code); //记录日志 result = true; } return(result); }
private bool DoAdd() { bool result = false; Model.Order model = new Model.Order(); BLL.Order bll = new BLL.Order(); model.TransportOrderId = Convert.ToInt32(ddlTransportOrder.SelectedValue); model.Code = string.Format("No{0}", DateTime.Now.ToString("yyyyMMddhhmmss")); model.AcceptOrderTime = Convert.ToDateTime(txtAcceptOrderTime.Text.Trim()); model.ArrivedTime = Convert.ToDateTime(txtArrivedTime.Text.Trim()); model.ContractNumber = txtContractNumber.Text.Trim(); model.BillNumber = txtBillNumber.Text.Trim(); model.WeighbridgeNumber = txtWeighbridgeNumber.Text.Trim(); model.IsCharteredCar = chkIsCharteredCar.Checked ? 1 : 0; model.Quantity = Convert.ToDecimal(txtQuantity.Text.Trim()); model.IsWeightNote = chkIsWeightNote.Checked; model.IsAllotted = chkIsAllotted.Checked; model.UnitPrice = Convert.ToDecimal(txtUnitPrice.Text.Trim()); model.Weight = Convert.ToDecimal(txtWeight.Text.Trim()); model.Freight = Convert.ToDecimal(txtFreight.Text.Trim()); model.PaidFreight = Convert.ToDecimal(txtPaidFreight.Text.Trim()); model.UnpaidFreight = Convert.ToDecimal(txtUnpaidFreight.Text.Trim()); model.HandlingCharge = Convert.ToDecimal(txtHandlingCharge.Text.Trim()); model.LoadingAddress = ddlLoadingAddress.SelectedItem.Text; model.UnloadingAddress = ddlUnloadingAddress.SelectedItem.Text; model.ShipperId = Convert.ToInt32(ddlShipper.SelectedValue); model.ReceiverId = Convert.ToInt32(ddlReceiver.SelectedValue); model.Haulway = ddlHaulway.SelectedItem.Text; model.LoadingCapacityRunning = Convert.ToDecimal(txtLoadingCapacityRunning.Text.Trim()); model.NoLoadingCapacityRunning = Convert.ToDecimal(txtNoLoadingCapacityRunning.Text.Trim()); model.GoodsId = Convert.ToInt32(ddlGoods.SelectedValue); model.Status = 0; model.Remarks = txtRemarks.Text.Trim(); model.CreateDateTime = DateTime.Now; if (bll.Add(model) > 0) { AddAdminLog(DTEnums.ActionEnum.Add.ToString(), "添加订单:" + model.Code); //记录日志 result = true; } return result; }
private bool DoAdd() { bool result = false; Model.Order model = new Model.Order(); BLL.Order bll = new BLL.Order(); model.Code = "No" + DateTime.Now.ToString("yyyyMMddhhmmss"); model.AcceptOrderTime = Convert.ToDateTime(txtAcceptOrderTime.Text.Trim()); model.ArrivedTime = Convert.ToDateTime(txtArrivedTime.Text.Trim()); model.Shipper = ddlShipper.SelectedItem.Text; model.ShipperLinkMan = txtShipperLinkMan.Text.Trim(); model.ShipperLinkTel = txtShipperLinkTel.Text.Trim(); model.Receiver = ddlReceiver.SelectedItem.Text; model.ReceiverLinkMan = txtReceiverLinkMan.Text.Trim(); model.ReceiverLinkTel = txtReceiverLinkTel.Text.Trim(); model.ContractNumber = txtContractNumber.Text.Trim(); model.LoadingAddress = ddlLoadingAddress.SelectedItem.Text; model.UnloadingAddress = ddlUnloadingAddress.SelectedItem.Text; model.Goods = ddlGoods.SelectedItem.Text; model.Unit = txtUnit.Text.Trim(); model.IsCharteredCar = chkIsCharteredCar.Checked ? 1 : 0; model.Quantity = Convert.ToDecimal(txtQuantity.Text.Trim()); model.DispatchedCount = 0.00M; model.Haulway = ddlHaulway.SelectedItem.Text; model.LoadingCapacityRunning = Convert.ToDecimal(txtLoadingCapacityRunning.Text.Trim()); model.NoLoadingCapacityRunning = Convert.ToDecimal(txtNoLoadingCapacityRunning.Text.Trim()); model.BillNumber = txtBillNumber.Text.Trim(); model.WeighbridgeNumber = txtWeighbridgeNumber.Text.Trim(); model.Formula = ddlFormula.SelectedItem.Text; model.UnitPrice = Convert.ToDecimal(txtUnitPrice.Text.Trim()); model.TotalPrice = Convert.ToDecimal(txtTotalPrice.Text.Trim()); model.SettleAccountsWay = ddlSettleAccountsWay.SelectedValue; model.Status = 0; model.Remarks = txtRemarks.Text.Trim(); if (bll.Add(model) > 0) { AddAdminLog(DTEnums.ActionEnum.Add.ToString(), "添加订单:" + model.Code); //记录日志 result = true; } return result; }