Example #1
0
        /// <summary>
        ///     加载页面数据
        /// </summary>
        private void LoadData()
        {
            switch (Actions)
            {
            case WebAction.Add:
                txtKeyId.Text = SequenceService.CreateSequence("TM", CurrentUser.AccountComId);
                Region1.Title = "添加盘亏单";
                var temp = new LHStockOut
                {
                    KeyId = txtKeyId.Text,

                    FFlag = 1,

                    FDeleteFlag = 1,

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

                    CreateBy = CurrentUser.AccountName,

                    FDate = txtFDate.SelectedDate,

                    FCompanyId = CurrentUser.AccountComId,

                    FStatus = Convert.ToInt32(GasEnumBillStauts.Add),

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

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

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

                Grid1.SummaryData = summary;

                break;

            case WebAction.Edit:
                Region1.Title = "编辑盘亏单";
                txtKeyId.Text = KeyId;
                if (StockOut != null)
                {
                    txtFMemo.Text          = StockOut.FMemo;
                    ddlFCate.SelectedValue = StockOut.FCate;
                    BindDataGrid();
                }
                break;
            }
        }
Example #2
0
        /// <summary>
        ///     加载页面数据
        /// </summary>
        private void LoadData()
        {
            switch (Actions)
            {
            case WebAction.Add:
                txtKeyId.Text = SequenceService.CreateSequence("TM", CurrentUser.AccountComId);
                Region3.Title = "添加采购申请单";

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

                    FFlag = 1,

                    FDeleteFlag = 1,

                    //采购申请单
                    FType = Convert.ToInt32(GasEnumBill.PurchaseApp),

                    CreateBy = CurrentUser.AccountName,

                    FDate = txtFDate.SelectedDate,

                    FCompanyId = CurrentUser.AccountComId,

                    FStatus = Convert.ToInt32(GasEnumBillStauts.Add),

                    FProgress = Convert.ToInt32(GasEnumBillStauts.Add),

                    FCate = "供应商"
                };

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

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

                Grid1.SummaryData = summary;

                break;

            case WebAction.Edit:
                txtKeyId.Text = KeyId;
                Region3.Title = "编辑出门证";

                if (StockOut != null)
                {
                    WebControlHandler.BindObjectToControls(StockOut, SimpleForm1);
                    txtFDate.SelectedDate = StockOut.FDate;
                    tbxFCustomer.Text     = StockOut.FName;
                    txtFCode.Text         = StockOut.FCode;

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

                    //ddlSubject.SelectedValue = StockOut.FSubjectCode;
                    ddlFVehicleNum.SelectedValue        = StockOut.FVehicleNum;
                    ddlFArea.SelectedValue              = StockOut.FArea;
                    ddlDeliveryMethod.SelectedValue     = StockOut.FDeliveryMethod;
                    ddlFCate.SelectedValue              = StockOut.FLogisticsNumber;
                    ddlFDistributionPoint.SelectedValue = StockOut.FDistributionPoint;

                    //if (Attachment != null)
                    //{
                    //    lblfile.Text = string.Format(@"<a href='../../{0}' target='_blank'>附件</a>",//
                    //        Attachment.FPath.Replace("~/", ""));
                    //}
                    //else
                    //{
                    //    lblfile.Text = string.Empty;
                    //}

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

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

                    FFlag = 1,

                    FDeleteFlag = 1,

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

                    CreateBy = CurrentUser.AccountName,

                    FDate = txtFDate.SelectedDate,

                    FCompanyId = CurrentUser.AccountComId,

                    FStatus = Convert.ToInt32(GasEnumBillStauts.Add),

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

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

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

                Grid1.SummaryData = summary;

                break;

            case WebAction.Edit:
                txtKeyId.Text = KeyId;

                Region3.Title = "编辑领料单";
                if (StockOut != null)
                {
                    WebControlHandler.BindObjectToControls(StockOut, SimpleForm1);
                    txtFDate.SelectedDate = StockOut.FDate;
                    //tbxFCustomer.Text = StockOut.FName;

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

                    //ddlFVehicleNum.SelectedValue = StockOut.FVehicleNum;
                    //ddlFArea.SelectedValue = StockOut.FArea;
                    //ddlDeliveryMethod.SelectedValue = StockOut.FDeliveryMethod;

                    ddlFCate.SelectedValue = StockOut.FCate;

                    ddlOrgnization.SelectedValue = StockOut.FCode;

                    ddlFReceiver.SelectedValue = StockOut.FSalesman;

                    ddlFWarehouse.SelectedValue = StockOut.FT6Warehouse;

                    ddlT6ReceiveSendType.SelectedValue = StockOut.FT6ReceiveSendTypeNum;

                    ddlFGroup.SelectedValue = StockOut.FGroup;

                    ddlFDistributionPoint.SelectedValue = StockOut.FDistributionPoint;

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

                    FFlag = 1,

                    FDeleteFlag = 1,

                    //采购退货
                    FType = Convert.ToInt32(GasEnumBill.PurchaseReturn),

                    CreateBy = CurrentUser.AccountName,

                    FDate = txtFDate.SelectedDate,

                    FCompanyId = CurrentUser.AccountComId,

                    FStatus = Convert.ToInt32(GasEnumBillStauts.Add),

                    FProgress = Convert.ToInt32(GasEnumBillStauts.Add),

                    FCate = "供应商"
                };

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

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

                Grid1.SummaryData = summary;

                break;

            case WebAction.Edit:
                txtKeyId.Text = KeyId;
                Region1.Title = "编辑采购退货单";
                if (StockOut != null)
                {
                    WebControlHandler.BindObjectToControls(StockOut, SimpleForm1);
                    txtFDate.SelectedDate = StockOut.FDate;
                    tbxFCustomer.Text     = StockOut.FName;

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

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

                    ddlFT6PurchaseType.SelectedValue   = StockOut.FT6PurchaseTypeNum;
                    ddlFT6Currency.SelectedValue       = StockOut.FT6Currency;
                    ddlT6ReceiveSendType.SelectedValue = StockOut.FT6ReceiveSendTypeNum;
                    ddlWarehouse.SelectedValue         = StockOut.FT6Warehouse;

                    BindDataGrid();
                }


                break;
            }
        }
Example #5
0
        /// <summary>
        ///     加载页面数据
        /// </summary>
        private void LoadData()
        {
            switch (Actions)
            {
            case WebAction.Add:
                Region1.Title = "添加钢瓶出库单";
                txtKeyId.Text = SequenceService.CreateSequence("TM", CurrentUser.AccountComId);
                var temp = new LHStockOut
                {
                    KeyId = txtKeyId.Text,

                    FFlag = 1,

                    FDeleteFlag = 1,

                    //空瓶出库单
                    FType = Convert.ToInt32(GasEnumBill.BottleTo),

                    CreateBy = CurrentUser.AccountName,

                    FDate = txtFDate.SelectedDate,

                    FCompanyId = CurrentUser.AccountComId,

                    FStatus = Convert.ToInt32(GasEnumBillStauts.Add),

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

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

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

                Grid1.SummaryData = summary;
                break;

            case WebAction.Edit:
                Region1.Title = "编辑钢瓶出库单";
                txtKeyId.Text = KeyId;
                if (StockOut != null)
                {
                    txtFCode.Text     = StockOut.FCode;
                    tbxFCustomer.Text = StockOut.FName;

                    txtFAddress.Text = StockOut.FAddress;
                    txtFFreight.Text = StockOut.FFreight.ToString();

                    txtFLinkman.Text = StockOut.FLinkman;
                    txtFMemo.Text    = StockOut.FMemo;
                    txtFPhone.Text   = StockOut.FPhone;

                    ddlFDriver.Text                     = StockOut.FDriver;
                    ddlFShipper.SelectedValue           = StockOut.FShipper;
                    ddlFSupercargo.Text                 = StockOut.FSupercargo;
                    ddlFVehicleNum.SelectedValue        = StockOut.FVehicleNum;
                    ddlDeliveryMethod.SelectedValue     = StockOut.FDeliveryMethod;
                    ddlFDistributionPoint.SelectedValue = StockOut.FDistributionPoint;

                    hfdCate.Text = StockOut.FCate;

                    BindDataGrid();
                }
                break;
            }
        }