Exemple #1
0
        /// <summary>
        ///     加载页面数据
        /// </summary>
        private void LoadData()
        {
            switch (Actions)
            {
            case WebAction.Add:
                Region1.Title = "添加空瓶回收单";

                txtKeyId.Text = SequenceService.CreateSequence("TM", CurrentUser.AccountComId);
                var temp = new LHStockIn
                {
                    KeyId = txtKeyId.Text,

                    FFlag = 1,

                    FDeleteFlag = 1,

                    //空瓶回收单
                    FType = Convert.ToInt32(GasEnumBill.BottleReturn),

                    CreateBy = CurrentUser.AccountName,

                    FDate = txtFDate.SelectedDate,

                    FCompanyId = CurrentUser.AccountComId,

                    FStatus = Convert.ToInt32(GasEnumBillStauts.Add),

                    FProgress = Convert.ToInt32(GasEnumBillStauts.Add),
                };

                //临时写入单据
                StockInService.Add(temp);

                break;

            case WebAction.Edit:
                Region1.Title = "编辑空瓶回收单";
                txtKeyId.Text = KeyId;
                if (StockIn != null)
                {
                    WebControlHandler.BindObjectToControls(StockIn, SimpleForm1);
                    txtFDate.SelectedDate = StockIn.FDate;
                    tbxFCustomer.Text     = StockIn.FName;

                    if (!string.IsNullOrEmpty(StockIn.FDriver))
                    {
                        ddlFDriver.SelectedValueArray = StockIn.FDriver.Split(',');
                    }
                    if (!string.IsNullOrEmpty(StockIn.FShipper))
                    {
                        ddlFShipper.SelectedValueArray = StockIn.FShipper.Split(',');
                    }
                    if (!string.IsNullOrEmpty(StockIn.FSupercargo))
                    {
                        ddlFSupercargo.SelectedValueArray = StockIn.FSupercargo.Split(',');
                    }
                    if (!string.IsNullOrEmpty(StockIn.FSalesman))
                    {
                        ddlFSalesman.SelectedValueArray = StockIn.FSalesman.Split(',');
                    }

                    ddlFVehicleNum.SelectedValue    = StockIn.FVehicleNum;
                    ddlFArea.SelectedValue          = StockIn.FArea;
                    ddlDeliveryMethod.SelectedValue = StockIn.FDeliveryMethod;
                    ddlReturn.SelectedValue         = StockIn.FClass;
                    ddlDeliveryMethod.SelectedValue = StockIn.FDeliveryMethod;

                    ddlFDistributionPoint.SelectedValue = StockIn.FDistributionPoint;

                    hfdCate.Text = StockIn.FCate;

                    BindDataGrid();
                }
                break;
            }
        }
Exemple #2
0
        /// <summary>
        ///     加载页面数据
        /// </summary>
        private void LoadData()
        {
            switch (Actions)
            {
            case WebAction.Add:
                txtKeyId.Text           = SequenceService.CreateSequence("TM", CurrentUser.AccountComId);
                Region1.Title           = "添加采购单";
                txtFT6ExchangeRate.Text = "1";
                var temp = new LHStockIn
                {
                    KeyId = txtKeyId.Text,

                    FFlag = 1,

                    FDeleteFlag = 1,

                    //发货单
                    FType = Convert.ToInt32(GasEnumBill.Purchase),

                    CreateBy = CurrentUser.AccountName,

                    FDate = txtFDate.SelectedDate,

                    FCompanyId = CurrentUser.AccountComId,

                    FStatus = Convert.ToInt32(GasEnumBillStauts.Add),

                    FProgress = Convert.ToInt32(GasEnumBillStauts.Add),

                    FCate = "供应商"
                };

                //临时写入单据
                StockInService.Add(temp);

                //合计
                var summary = new JObject
                {
                    { "FItemCode", "合计" },
                    { "FQty", 0 },
                    { "FAmount", 0 }
                };
                Grid1.SummaryData = summary;
                break;

            case WebAction.Edit:
                Region1.Title = "编辑采购单";
                txtKeyId.Text = KeyId;
                if (StockIn != null)
                {
                    WebControlHandler.BindObjectToControls(StockIn, SimpleForm1);

                    txtFDate.SelectedDate = StockIn.FDate;
                    tbxFCustomer.Text     = StockIn.FName;

                    if (!string.IsNullOrEmpty(StockIn.FDriver))
                    {
                        ddlFDriver.SelectedValueArray = StockIn.FDriver.Split(',');
                    }
                    if (!string.IsNullOrEmpty(StockIn.FShipper))
                    {
                        ddlFShipper.SelectedValueArray = StockIn.FShipper.Split(',');
                    }
                    if (!string.IsNullOrEmpty(StockIn.FSupercargo))
                    {
                        ddlFSupercargo.SelectedValueArray = StockIn.FSupercargo.Split(',');
                    }
                    if (!string.IsNullOrEmpty(StockIn.FSalesman))
                    {
                        ddlFSalesman.SelectedValueArray = StockIn.FSalesman.Split(',');
                    }

                    ddlSubject.SelectedValue        = StockIn.FSubjectCode;
                    ddlFVehicleNum.SelectedValue    = StockIn.FVehicleNum;
                    ddlFArea.SelectedValue          = StockIn.FArea;
                    ddlDeliveryMethod.SelectedValue = StockIn.FDeliveryMethod;

                    ddlFT6PurchaseType.SelectedValue    = StockIn.FT6PurchaseTypeNum;
                    ddlFT6Currency.SelectedValue        = StockIn.FT6Currency;
                    ddlT6ReceiveSendType.SelectedValue  = StockIn.FT6ReceiveSendTypeNum;
                    tbxFLogisticsNumber.Text            = StockIn.FLogisticsNumber;
                    ddlWarehouse.SelectedValue          = StockIn.FT6Warehouse;
                    ddlFDistributionPoint.SelectedValue = StockIn.FDistributionPoint;

                    BindDataGrid();
                }
                break;
            }
        }
Exemple #3
0
        /// <summary>
        ///     加载页面数据
        /// </summary>
        private void LoadData()
        {
            switch (Actions)
            {
            case WebAction.Add:
                txtKeyId.Text = SequenceService.CreateSequence("TM", CurrentUser.AccountComId);
                Region3.Title = "添加入库单";

                var temp = new LHStockIn
                {
                    KeyId = txtKeyId.Text,

                    FFlag = 1,

                    FAuditFlag = 1,

                    FDeleteFlag = 1,

                    //发货单
                    FType = Convert.ToInt32(GasEnumBill.output),

                    CreateBy = CurrentUser.AccountName,

                    FDate = txtFDate.SelectedDate,

                    FCompanyId = CurrentUser.AccountComId,

                    FStatus = Convert.ToInt32(GasEnumBillStauts.Add),

                    FProgress = Convert.ToInt32(GasEnumBillStauts.Add),
                };

                //临时写入单据
                StockInService.Add(temp);

                //合计
                var summary = new JObject
                {
                    { "FItemCode", "合计" },
                    { "FQty", 0 },
                    { "FAmount", 0 }
                };

                Grid1.SummaryData = summary;

                break;

            case WebAction.Edit:
                txtKeyId.Text = KeyId;

                Region3.Title = "编辑入库单";
                if (StockIn != null)
                {
                    WebControlHandler.BindObjectToControls(StockIn, SimpleForm1);
                    txtFDate.SelectedDate = StockIn.FDate;

                    ddlFCate.SelectedValue = StockIn.FCate;

                    ddlFSalesman.SelectedValue = StockIn.FSalesman;

                    ddlFWarehouse.SelectedValue = StockIn.FT6Warehouse;

                    ddlT6ReceiveSendType.SelectedValue = StockIn.FT6ReceiveSendTypeNum;

                    ddlFGroup.SelectedValue = StockIn.FGroup;

                    ddlFDistributionPoint.SelectedValue = StockIn.FDistributionPoint;

                    BindDataGrid();
                }
                break;
            }
        }