Example #1
0
        private void CreateQuery(VLayoutPanel vPanel)
        {
            var layout = new LayoutManager("", mDFInfo, mQueryContainer);
            var config = new AutoLayoutConfig();

            layout.Config = config;
            config.Add("ID");
            config.Add("Name");
            config.Add("AccountingUnit_ID");
            config.Add("Department_ID");
            config.Add("Employee_ID");
            vPanel.Add(layout.CreateLayout());

            HLayoutPanel hPanel = new HLayoutPanel()
            {
                Align = HorizontalAlign.Left
            };
            TSButton qButton = new TSButton("开始查询");

            hPanel.Add(qButton);
            qButton.Click += delegate
            {
                _grid.Query = GetDQueryDom();
                _grid.DataBind();
            };
            dfContainer.AddNonDFControl(qButton, "$btnsearch");
            hPanel.Add(new RedirectTSButton("清除条件"));
            vPanel.Add(hPanel);
            vPanel.Add(new HLayoutPanel());
        }
Example #2
0
        private void AddQueryResult(VLayoutPanel vPanel)
        {
            vPanel.Add(new LiteralControl("<BR/>"));
            grid = vPanel.Add(new DFBrowseGrid(new DFDataTableEditor())
            {
                Width = Unit.Percentage(100)
            });
            grid.Columns.Add(new DFBrowseGridColumn("Name"));
            grid.Columns.Add(new DFBrowseGridColumn("Code"));
            grid.Columns.Add(new DFBrowseGridColumn("Spec"));
            var goods2Name = new DFEditGridColumn <DFChoiceBox>("Goods2_ID");

            goods2Name.InitEditControl += delegate(object sender, InitEditControlEventArgs <DFChoiceBox> e)
            {
                e.Control.DataKind            = B3ButcheryDataSource.存货带编号;
                e.Control.DFDisplayField      = "Goods2_Name";
                e.Control.EnableInputArgument = true;
                e.Control.EnableTopItem       = true;
                e.Control.Width = Unit.Pixel(120);
            };
            grid.Columns.EAdd(goods2Name).HeaderText = "半成品名称";
            grid.Columns.Add(new DFEditGridColumn <DFValueLabel>("Goods2_Code"));
            grid.Columns.Add(new DFEditGridColumn <DFValueLabel>("Goods2_Spec"));
            grid.Columns.Add(new DFEditGridColumn("Remark"));
            vPanel.Add(new TSButton("保存", SaveBtnClick));
        }
Example #3
0
        private void CreateQuery(VLayoutPanel vPanel)
        {
            var layoutManager = new LayoutManager("", mDFInfo, mQueryContainer);

            var config = new AutoLayoutConfig();

            layoutManager.Config = config;

            AddQueryControl(config, layoutManager);
            vPanel.Add(layoutManager.CreateLayout(), new VLayoutOption(HorizontalAlign.Center));
            var hPanel = new HLayoutPanel()
            {
                Align = HorizontalAlign.Center
            };

            var qButton = new TSButton("开始查询");

            hPanel.Add(qButton);
            qButton.Click += delegate
            {
                GetDetail();
                mGrid.DataBind();
            };
            dfContainer.AddNonDFControl(qButton, "$btnsearch");
            hPanel.Add(new RedirectTSButton("清除条件"));
            vPanel.Add(hPanel);
        }
Example #4
0
        private void AddQueryControl(VLayoutPanel vPanel)
        {
            var mDFInfo = DFInfo.Get(typeof(Goods_Accounting_Store));
            var manager = new LayoutManager("", mDFInfo, _mQueryContainer);

            manager.Add("Goods_ID", QueryCreator.DFChoiceBox(mDFInfo.Fields["Goods_ID"], B3UnitedInfosConsts.DataSources.存货全部));

            manager.Add("Store_ID", QueryCreator.DFChoiceBox(mDFInfo.Fields["Store_ID"], B3FrameworksConsts.DataSources.授权仓库));

            manager.Add("AccountingUnit_ID", QueryCreator.DFChoiceBox(mDFInfo.Fields["AccountingUnit_ID"], B3FrameworksConsts.DataSources.授权会计单位));

            manager.Add("GoodsPropertyCatalog_ID", new SimpleLabel("存货属性分类"), _goodsPropertyCatalogBox = QueryCreator.DFChoiceBox(mDFInfo.Fields["AccountingUnit_ID"], B3UnitedInfosConsts.DataSources.存货属性分类));

            manager.Add("GoodsProperty_ID", new SimpleLabel("存货属性"), QueryCreator.DFChoiceBox(mDFInfo.Fields["AccountingUnit_ID"], B3UnitedInfosConsts.DataSources.存货属性全部));

            var config = new AutoLayoutConfig
            {
                Cols = 8,
                DefaultLabelWidth = 4,
            };

            config.Add("Goods_ID");
            config.Add("Store_ID");
            config.Add("AccountingUnit_ID");
            config.Add("GoodsPropertyCatalog_ID");
            config.Add("GoodsProperty_ID");
            manager.Config = config;
            vPanel.Add(manager.CreateLayout());
            var hPanel = vPanel.Add(new HLayoutPanel());

            hPanel.Add(new TSButton("开始查询", delegate { StartQuery(); }));
            hPanel.Add(new RedirectTSButton("清除条件"));
        }
Example #5
0
        private void CreateOutputDetailPanel(VLayoutPanel vPanel)
        {
            var hPanel = vPanel.Add(new HLayoutPanel(), new VLayoutOption(HorizontalAlign.Left));

            hPanel.Add(new LiteralControl("<h2>明细清单:</h2>"));
            if (CanSave)
            {
                hPanel.Add(new TSButton("载入明细")).Click += delegate
                {
                    GetFromUI();
                    Dmo.Details.Clear();
                    AddLoadDetailQy();
                    outputDetailGrid.DataBind();
                    AspUtil.Alert(this, "载入投入明细成功");
                };

                hPanel.Add(new SimpleLabel("选择存货"));
                var selectEmp = hPanel.Add(new ChoiceBox(B3UnitedInfosConsts.DataSources.存货)
                {
                    Width = Unit.Pixel(130), EnableInputArgument = true, AutoPostBack = true
                });
                selectEmp.SelectedValueChanged += delegate
                {
                    outputDetailGrid.GetFromUI();
                    if (!selectEmp.IsEmpty)
                    {
                        var empID = long.Parse(selectEmp.Value);
                        if (!Dmo.Details.Any(x => x.Goods_ID == empID))
                        {
                            var d = new ProduceInput_Detail()
                            {
                                Goods_ID = empID
                            };
                            DmoUtil.RefreshDependency(d, "Goods_ID");
                            Dmo.Details.Add(d);
                        }
                    }
                    selectEmp.Clear();
                    outputDetailGrid.DataBind();
                };
            }
            var detailEditor = new DFCollectionEditor <ProduceInput_Detail>(() => Dmo.Details)
            {
                AllowDeletionFunc = () => CanSave,
                CanDeleteFunc     = detail => CanSave,
                IsEditableFunc    = (field, detail) => CanSave
            };

            outputDetailGrid = vPanel.Add(new DFEditGrid(detailEditor)
            {
                Width = Unit.Percentage(100)
            });
            outputDetailGrid.Columns.Add(new DFEditGridColumn <DFValueLabel>("Goods_Name"));
            outputDetailGrid.Columns.Add(new DFEditGridColumn <DFValueLabel>("Goods_Code"));
            AddDetailColumn(outputDetailGrid);
        }
Example #6
0
 private void AddQueryResult(VLayoutPanel vPanel)
 {
     vPanel.Add(new LiteralControl("<BR/>"));
     grid = vPanel.Add(new DFBrowseGrid(new DFDataTableEditor())
     {
         Width = Unit.Percentage(100)
     });
     grid.Columns.Add(new DFBrowseGridColumn("Name"));
     grid.Columns.Add(new DFBrowseGridColumn("Code"));
     grid.Columns.Add(new DFBrowseGridColumn("Spec"));
     grid.Columns.Add(new DFEditGridColumn("ReferencePrice"));
     grid.Columns.Add(new DFEditGridColumn("Remark"));
     vPanel.Add(new TSButton("保存", SaveBtnClick));
 }
Example #7
0
        private void CreateInputDetailPanel(VLayoutPanel vPanel)
        {
            var hPanel = vPanel.Add(new HLayoutPanel(), new VLayoutOption(HorizontalAlign.Left));

            hPanel.Add(new LiteralControl("<h2>投入明细:</h2>"));
            if (CanSave)
            {
                hPanel.Add(new SimpleLabel("选择存货"));
                var selectEmp = hPanel.Add(new ChoiceBox(B3UnitedInfosConsts.DataSources.存货)
                {
                    Width = Unit.Pixel(130), EnableInputArgument = true, AutoPostBack = true
                });
                selectEmp.SelectedValueChanged += delegate
                {
                    inputDetailGrid.GetFromUI();
                    if (!selectEmp.IsEmpty)
                    {
                        var empID = long.Parse(selectEmp.Value);
                        if (!Dmo.InputDetails.Any(x => x.Goods_ID == empID))
                        {
                            var d = new ProductPlan_InputDetail()
                            {
                                Goods_ID = empID
                            };
                            DmoUtil.RefreshDependency(d, "Goods_ID");
                            Dmo.InputDetails.Add(d);
                        }
                    }
                    selectEmp.Clear();
                    inputDetailGrid.DataBind();
                };
            }
            var detailEditor = new DFCollectionEditor <ProductPlan_InputDetail>(() => Dmo.InputDetails);

            detailEditor.AllowDeletionFunc = () => CanSave;
            detailEditor.CanDeleteFunc     = (detail) => CanSave;
            detailEditor.IsEditableFunc    = (field, detail) => CanSave;
            inputDetailGrid = vPanel.Add(new DFEditGrid(detailEditor)
            {
                Width = Unit.Percentage(100)
            });
            inputDetailGrid.Columns.Add(new DFEditGridColumn <DFValueLabel>("Goods_Name"));
            inputDetailGrid.Columns.Add(new DFEditGridColumn <DFValueLabel>("Goods_Code"));
            inputDetailGrid.Columns.Add(new DFEditGridColumn <DFValueLabel>("Goods_Spec"));
            inputDetailGrid.Columns.Add(new DFEditGridColumn <DFTextBox>("PlanNumber"));
            inputDetailGrid.Columns.Add(new DFEditGridColumn <DFValueLabel>("Goods_MainUnit"));
            inputDetailGrid.Columns.Add(new DFEditGridColumn <DFTextBox>("PlanSecondNumber"));
            inputDetailGrid.Columns.Add(new DFEditGridColumn <DFValueLabel>("Goods_SecondUnit"));
            inputDetailGrid.Columns.Add(new DFEditGridColumn <DFTextBox>("Remark"));
        }
Example #8
0
 protected override void AddQueryControls(VLayoutPanel vPanel)
 {
     vPanel.Add(CreateDefaultBaseInfoQueryControls((panel, config) =>
     {
         config.AddAfter("Code", "ID");
     }));
 }
Example #9
0
        protected override void AddQueryControls(VLayoutPanel vPanel)
        {
            var customPanel = new LayoutManager("Main", mainInfo, mQueryContainer);

            //查询条件包括::{日期}、{计划号}、{会计单位}、{部门}、{经办人}、{生产环节}、{存货名称}、{存货编码},


            customPanel.Add("ID", new SimpleLabel("单号"), goodsName = QueryCreator.DFTextBox(mainInfo.Fields["ID"]));

            customPanel.Add("AccountingUnit_ID", QueryCreator.DFChoiceBoxEnableMultiSelection(mainInfo.Fields["AccountingUnit_ID"], mQueryContainer, "AccountingUnit_ID", B3FrameworksConsts.DataSources.授权会计单位全部));
            customPanel["AccountingUnit_ID"].NotAutoAddToContainer = true;

            customPanel.Add("Department_ID", QueryCreator.DFChoiceBoxEnableMultiSelection(mainInfo.Fields["Department_ID"], mQueryContainer, "Department_ID", B3FrameworksConsts.DataSources.授权部门全部));
            customPanel["Department_ID"].NotAutoAddToContainer = true;

            customPanel.Add("Employee_ID", QueryCreator.DFChoiceBoxEnableMultiSelection(mainInfo.Fields["Employee_ID"], mQueryContainer, "Employee_ID", B3FrameworksConsts.DataSources.授权员工全部));
            customPanel["Employee_ID"].NotAutoAddToContainer = true;

            customPanel.Add("PlanNumber", mQueryContainer.Add(QueryCreator.DFTextBox(mainInfo.Fields["PlanNumber"]), "PlanNumber"));
            customPanel["PlanNumber"].NotAutoAddToContainer = true;


            customPanel.Add("Goods_Name", new SimpleLabel("存货名称"), goodsName = QueryCreator.DFTextBox(detailInfo.Fields["Goods_Name"]));
            customPanel.Add("Goods_Code", new SimpleLabel("存货编号"), goodsCode = QueryCreator.DFTextBox(detailInfo.Fields["Goods_Code"]));
            customPanel.CreateDefaultConfig(2).Expand = false;
            vPanel.Add(customPanel.CreateLayout());
        }
Example #10
0
        private void CreateQueryPanel(VLayoutPanel vPanel)
        {
            var       tablePanel = vPanel.Add(new TableLayoutPanel(5, 5), new VLayoutOption(System.Web.UI.WebControls.HorizontalAlign.Justify));
            var       row        = 0;
            const int labelWidth = 4;

            tablePanel.Add(0, 1, row, row + 1, new SimpleLabel("包装日期", labelWidth));
            dateInput = tablePanel.Add(1, 2, row, ++row, new DFDateInput()
            {
                Date = DateTime.Today.AddDays(-1)
            });

            tablePanel.Add(0, 1, row, row + 1, new SimpleLabel("产出日期", labelWidth));
            dateInput = tablePanel.Add(1, 2, row, ++row, new DFDateInput()
            {
                Date = DateTime.Today.AddDays(1)
            });

            tablePanel.Add(0, 1, row, row + 1, new SimpleLabel("会计单位"));
            tablePanel.Add(1, 2, row, ++row, CreateAccPart());

            tablePanel.Add(0, 1, row, row + 1, new SimpleLabel("生产单位"));
            tablePanel.Add(1, 2, row, ++row, CreateProducUnitPart());

            tablePanel.Add(0, 1, row, row + 1, new SimpleLabel("存货分类"));
            tablePanel.Add(1, 2, row, ++row, CreatGoodsCategoryPart());
        }
Example #11
0
        protected override void AddQueryControls(VLayoutPanel vPanel)
        {
            var customPanel = new LayoutManager("Main", _mainInfo, mQueryContainer);

            customPanel.Add("ID", mQueryContainer.Add(new DFTextBox(_mainInfo.Fields["ID"]), "ID"));
            customPanel["ID"].NotAutoAddToContainer = true;
            customPanel.Add("PlanNumber_ID", new SimpleLabel("计划号"), QueryCreator.DFChoiceBoxEnableMultiSelection(_detailInfo.Fields["PlanNumber_ID"], mQueryContainer, "PlanNumber_ID", B3ButcheryDataSource.计划号));
            customPanel["PlanNumber_ID"].NotAutoAddToContainer = true;
            customPanel.Add("AccountingUnit_ID", QueryCreator.DFChoiceBoxEnableMultiSelection(_mainInfo.Fields["AccountingUnit_ID"], mQueryContainer, "AccountingUnit_ID", B3FrameworksConsts.DataSources.授权会计单位全部));
            customPanel["AccountingUnit_ID"].NotAutoAddToContainer = true;
            customPanel.Add("Department_ID", QueryCreator.DFChoiceBoxEnableMultiSelection(_mainInfo.Fields["Department_ID"], mQueryContainer, "Department_ID", B3FrameworksConsts.DataSources.授权部门全部));
            customPanel["Department_ID"].NotAutoAddToContainer = true;
            customPanel.Add("Store_ID", new SimpleLabel("仓库"), QueryCreator.DFChoiceBoxEnableMultiSelection(_mainInfo.Fields["Store_ID"], mQueryContainer, "Store_ID", B3ButcheryDataSource.速冻库));
            customPanel["Store_ID"].NotAutoAddToContainer = true;

            customPanel.Add("BillState", mQueryContainer.Add(QueryCreator.一般单据状态可多选(_mainInfo.Fields["BillState"]), "BillState"));
            customPanel["BillState"].NotAutoAddToContainer = true;



            customPanel.Add("Goods_ID", new SimpleLabel("存货"), QueryCreator.DFChoiceBoxEnableMultiSelection(_detailInfo.Fields["Goods_ID"], mQueryContainer, "Goods_ID", B3UnitedInfosConsts.DataSources.存货));
            customPanel["Goods_ID"].NotAutoAddToContainer = true;
            customPanel.CreateDefaultConfig(2).Expand     = false;
            vPanel.Add(customPanel.CreateLayout());
        }
Example #12
0
        public static void CreateExportExcelPart(VLayoutPanel vPanel, DFBrowseGrid grid, string displayName)
        {
            HLayoutPanel hbox     = vPanel.Add(new HLayoutPanel(), new VLayoutOption(HorizontalAlign.Left));
            var          exporter = new Exporter();

            hbox.Add(new TSButton("导出到Excel", delegate
            {
                var lastQuery = grid.LastQuery;
                if (lastQuery == null)
                {
                    throw new Exception("请先进行查询");
                }
                var dom = new LoadArguments((DQueryDom)lastQuery.DQuery.Clone());
                foreach (var colIndex in lastQuery.SumColumns)
                {
                    dom.SumColumns.Add(colIndex);
                }
                foreach (var colIndex in lastQuery.GroupSumColumns)
                {
                    dom.GroupSumColumns.Add(colIndex);
                }
                dom.DQuery.Range = SelectRange.All;
                exporter.Export(new TSingSoft.WebPluginFramework.Exports.QueryResultExcelExporter(displayName, GetQueryResult(dom)));
            }));
            hbox.Add(exporter);
        }
Example #13
0
        protected override void CreateQuery(VLayoutPanel vPanel)
        {
            var layoutManager = new LayoutManager("", mDFInfo, mQueryContainer);

            layoutManager.Add("存货属性分类", new SimpleLabel("属性分类"), QueryCreator.DFChoiceBox(mDFInfo.Fields["ID"], B3UnitedInfosConsts.DataSources.存货属性分类));
            layoutManager.Add("ProductLine_ID", mQueryContainer.Add(QueryCreator.DFChoiceBox(mDFInfo.Fields["ProductLine_ID"], B3UnitedInfosConsts.DataSources.产品线全部), "ProductLine_ID"));
            layoutManager["ProductLine_ID"].NotAutoAddToContainer = true;
            var config = new AutoLayoutConfig {
                Cols = 8, DefaultLabelWidth = 4
            };

            config.Add("Name");
            config.Add("Spec");
            config.Add("Code");
            config.Add("GoodsProperty_ID");
            config.Add("存货属性分类");
            config.Add("ProductLine_ID");
            layoutManager.Config = config;

            var section = mPageLayoutManager.AddSection(B3FrameworksConsts.PageLayouts.QueryConditions, B3FrameworksConsts.PageLayouts.QueryConditions_DisplayName);

            section.ApplyLayout(layoutManager, config, mPageLayoutManager, mDFInfo as DFInfo);
            vPanel.Add(layoutManager.CreateLayout());
            base.CreateQuery(vPanel);
        }
Example #14
0
        protected override void AddQueryControls(VLayoutPanel vPanel)
        {
            var customPanel = new LayoutManager("Main", _mainInfo, mQueryContainer);

            auuInput = customPanel.Add("AccountingUnit_ID", QueryCreator.DFChoiceBoxEnableMultiSelection(_mainInfo.Fields["AccountingUnit_ID"], mQueryContainer, "AccountingUnit_ID", B3FrameworksConsts.DataSources.授权会计单位全部));
            customPanel["AccountingUnit_ID"].NotAutoAddToContainer = true;
            departInput = customPanel.Add("Department_ID", QueryCreator.DFChoiceBoxEnableMultiSelection(_mainInfo.Fields["Department_ID"], mQueryContainer, "Department_ID", B3FrameworksConsts.DataSources.授权部门全部));
            customPanel["Department_ID"].NotAutoAddToContainer = true;


            customPanel.Add("Goods_ID", new SimpleLabel("产出单存货"), goodInput = QueryCreator.DFChoiceBoxEnableMultiSelection(_detailInfo.Fields["Goods_ID"], mQueryContainer, "Goods_ID", B3UnitedInfosConsts.DataSources.存货));
            customPanel["Goods_ID"].NotAutoAddToContainer = true;

            var config = customPanel.CreateDefaultConfig(2);

            config.Expand = false;
            var section = mPageLayoutManager.AddSection("查询条件", "查询条件");

            section.ApplyLayout(customPanel, config, mPageLayoutManager, _mainInfo);
            section.SetDisplayName("AccountingUnit_ID", "会计单位");
            section.SetDisplayName("Department_ID", "部门");
            section.SetDisplayName("Goods_ID", "产出单存货");


            vPanel.Add(customPanel.CreateLayout(), new VLayoutOption(HorizontalAlign.Left));
            //vPanel.Add(customPanel.CreateLayout());
        }
Example #15
0
        protected override void AddQueryControls(VLayoutPanel vPanel)
        {
            var layoutManager = new LayoutManager("", mDFInfo, mQueryContainer);

            var config = new AutoLayoutConfig();

            config.Add("ID");
            config.Add("CreateUser_Name");
            config.Add("CheckUser_Name");
            config.Add("AccountingUnit_ID");
            config.Add("Employee_ID");
            config.Add("Customer_ID");
            config.Add("Date");
            config.Add("BillState");
            config.Add("ProductionUnit_ID");
            config.Add("IsLocked");
            AddTagQueryInput(layoutManager, config);

            var section = mPageLayoutManager.AddSection(B3FrameworksConsts.PageLayouts.QueryConditions, B3FrameworksConsts.PageLayouts.QueryConditions_DisplayName);

            section.SetRequired("BillState");
            section.ApplyLayout(layoutManager, config, mPageLayoutManager, mDFInfo);

            layoutManager.Config = config;

            vPanel.Add(layoutManager.CreateLayout());
        }
Example #16
0
        protected override void AddQueryControls(VLayoutPanel vPanel)
        {
            var customPanel = new LayoutManager("Main", _mainInfo, mQueryContainer);

            customPanel.Add("ID", QueryCreator.DFChoiceBoxEnableMultiSelection(_mainInfo.Fields["ID"], mQueryContainer, "ID", B3ButcheryDataSource.生产通知单ID));
            customPanel["ID"].NotAutoAddToContainer = true;
            customPanel.Add("BillState", QueryCreator.一般单据状态(_mainInfo.Fields["BillState"]));
            customPanel.Add("AccountingUnit_ID", QueryCreator.DFChoiceBoxEnableMultiSelection(_mainInfo.Fields["AccountingUnit_ID"], mQueryContainer, "AccountingUnit_ID", B3FrameworksConsts.DataSources.授权会计单位全部));
            customPanel["AccountingUnit_ID"].NotAutoAddToContainer = true;
            customPanel.Add("Department_ID", QueryCreator.DFChoiceBoxEnableMultiSelection(_mainInfo.Fields["Department_ID"], mQueryContainer, "Department_ID", B3FrameworksConsts.DataSources.授权部门全部));
            customPanel["Department_ID"].NotAutoAddToContainer = true;

            customPanel.Add("Customer_ID", QueryCreator.DFChoiceBoxEnableMultiSelection(_mainInfo.Fields["Customer_ID"], mQueryContainer, "Customer_ID", "B3Sale_客户全部"));
            customPanel["Customer_ID"].NotAutoAddToContainer = true;
            customPanel.Add("ProductionUnit_ID", QueryCreator.DFChoiceBoxEnableMultiSelection(_mainInfo.Fields["ProductionUnit_ID"], mQueryContainer, "ProductionUnit_ID", B3ProduceUnitedInfosDataSources.生产单位全部));
            customPanel["ProductionUnit_ID"].NotAutoAddToContainer = true;

            customPanel.Add("Employee_ID", QueryCreator.DFChoiceBoxEnableMultiSelection(_mainInfo.Fields["Employee_ID"], mQueryContainer, "Employee_ID", B3FrameworksConsts.DataSources.授权员工全部));
            customPanel["Employee_ID"].NotAutoAddToContainer = true;

            AddQueryControlsByBrandItem_ID(customPanel, _detailInfo);

            customPanel.Add("Goods_ID", new SimpleLabel("存货"), QueryCreator.DFChoiceBoxEnableMultiSelection(_detailInfo.Fields["Goods_ID"], mQueryContainer, "Goods_ID", B3UnitedInfosConsts.DataSources.存货));
            customPanel["Goods_ID"].NotAutoAddToContainer = true;


            摘要 = new DFTextBox(_mainInfo.Fields["Remark"]);
            备注 = new DFTextBox(_detailInfo.Fields["Remark"]);
            customPanel.Add("摘要", new SimpleLabel("摘要"), 摘要);
            customPanel.Add("备注", new SimpleLabel("备注"), 备注);

            customPanel.CreateDefaultConfig(2).Expand = false;
            vPanel.Add(customPanel.CreateLayout());
        }
Example #17
0
 protected override void AddQueryControls(VLayoutPanel vPanel)
 {
     vPanel.Add(CreateDefaultBaseInfoQueryControls((panel, config) =>
     {
         config.Add("WorkshopCategory_ID");
         config.Add("No");
     }));
 }
Example #18
0
        private void CreateStoreDetailPanel(VLayoutPanel vPanel)
        {
            var hPanel = vPanel.Add(new HLayoutPanel(), new VLayoutOption(HorizontalAlign.Left));

            hPanel.Add(new LiteralControl("<h2>仓库明细:</h2>"));
            if (CanSave)
            {
                hPanel.Add(new SimpleLabel("选择仓库"));
                var selectStore = hPanel.Add(new ChoiceBox(B3FrameworksConsts.DataSources.授权仓库)
                {
                    Width = Unit.Pixel(130), EnableInputArgument = true, AutoPostBack = true
                });
                selectStore.SelectedValueChanged += delegate
                {
                    storeDetailGrid.GetFromUI();
                    if (!selectStore.IsEmpty)
                    {
                        var storeID = long.Parse(selectStore.Value);
                        if (!Dmo.StoreDetails.Any(x => x.Store_ID == storeID))
                        {
                            var d = new ProductInStoreTemplate_StoreDetail()
                            {
                                Store_ID = storeID
                            };
                            DmoUtil.RefreshDependency(d, "Store_ID");
                            Dmo.StoreDetails.Add(d);
                        }
                    }
                    selectStore.Clear();
                    storeDetailGrid.DataBind();
                };
            }
            var detailEditor = new DFCollectionEditor <ProductInStoreTemplate_StoreDetail>(() => Dmo.StoreDetails);

            detailEditor.AllowDeletionFunc = () => CanSave;
            detailEditor.CanDeleteFunc     = (detail) => CanSave;
            detailEditor.IsEditableFunc    = (field, detail) => CanSave;
            storeDetailGrid = vPanel.Add(new DFEditGrid(detailEditor)
            {
                Width = Unit.Percentage(100)
            });
            storeDetailGrid.Columns.Add(new DFEditGridColumn <DFValueLabel>("Store_Name"));
            storeDetailGrid.Columns.Add(new DFEditGridColumn <DFValueLabel>("Store_Code"));
            storeDetailGrid.Columns.Add(new DFEditGridColumn("Remark"));
        }
Example #19
0
        protected override void AddQueryControls(VLayoutPanel vPanel)
        {
            vPanel.Add(CreateDefaultBillQueryControls((panel, config) =>
            {
                config.AddAfter("Name", "ID");

                config.AddAfter("Packing_Attr", "Name");
            }));
        }
Example #20
0
        private void CreateInputDetailPanel(VLayoutPanel vPanel)
        {
            vPanel.Add(new LiteralControl("<h2>投入明细:</h2>"), new VLayoutOption(HorizontalAlign.Left));
            var detailEditor = new DFCollectionEditor <DailyProductReport_InputDetail>(() => Dmo.InputDetails);

            detailEditor.AllowDeletionFunc = () => CanSave;
            detailEditor.CanDeleteFunc     = (detail) => CanSave;
            detailEditor.IsEditableFunc    = (field, detail) => CanSave;
            inputGrid = vPanel.Add(new DFEditGrid(detailEditor)
            {
                Width = Unit.Percentage(100)
            });
            inputGrid.Columns.Add(new DFEditGridColumn <DFValueLabel>("Goods_Name"));
            inputGrid.Columns.Add(new DFEditGridColumn <DFValueLabel>("Goods_Code"));
            inputGrid.Columns.Add(new DFEditGridColumn <DFTextBox>("Number"));
            inputGrid.Columns.Add(new DFEditGridColumn <DFTextBox>("Weight"));
            inputGrid.Columns.Add(new DFEditGridColumn <DFTextBox>("Remark"));
        }
Example #21
0
 protected override void AddQueryControls(VLayoutPanel vPanel)
 {
     vPanel.Add(CreateDefaultBillQueryControls((panel, config) =>
     {
         config.Add("AccountingUnit_ID");
         config.Add("Department_ID");
         config.Add("Date");
     }));
 }
Example #22
0
 protected override void AddQueryControls(VLayoutPanel vPanel)
 {
     vPanel.Add(CreateDefaultBaseInfoQueryControls((panel, config) =>
     {
         config.Add("Code");
         config.Add("CalculateCatalog_ID");
         config.Add("Goods_ID");
     }));
 }
Example #23
0
        protected override void AddQueryControls(VLayoutPanel vPanel)
        {
            var layout = new LayoutManager("Main", mDFInfo, mQueryContainer);

            layout.Add("ID", mQueryContainer.Add(new DFTextBox(mDFInfo.Fields["ID"]), "ID"));
            layout["ID"].NotAutoAddToContainer = true;

            layout.Add("Date", new SimpleLabel("日期"), QueryCreator.DateRange(mDFInfo.Fields["Date"], mQueryContainer, "MinDate", "MaxDate"));
            layout["Date"].NotAutoAddToContainer = true;


            layout.Add("AccountingUnit_ID", new SimpleLabel("会计单位"),
                       QueryCreator.DFChoiceBoxEnableMultiSelection(mDFInfo.Fields["AccountingUnit_ID"], mQueryContainer, "AccountingUnit_ID", B3FrameworksConsts.DataSources.授权会计单位全部));
            layout["AccountingUnit_ID"].NotAutoAddToContainer = true;

            layout.Add("Department_ID", new SimpleLabel("部门"),
                       QueryCreator.DFChoiceBoxEnableMultiSelection(mDFInfo.Fields["Department_ID"], mQueryContainer, "Department_ID", B3FrameworksConsts.DataSources.部门全部));
            layout["Department_ID"].NotAutoAddToContainer = true;

            layout.Add("Employee_ID", new SimpleLabel("经办人"),
                       QueryCreator.DFChoiceBoxEnableMultiSelection(mDFInfo.Fields["Employee_ID"], mQueryContainer, "Employee_ID", B3FrameworksConsts.DataSources.员工全部));
            layout["Employee_ID"].NotAutoAddToContainer = true;

            layout.Add("Store_ID", new SimpleLabel("仓库"),
                       QueryCreator.DFChoiceBoxEnableMultiSelection(mDFInfo.Fields["Store_ID"], mQueryContainer, "Store_ID", B3FrameworksConsts.DataSources.可用仓库全部));
            layout["Store_ID"].NotAutoAddToContainer = true;

            layout.Add("Goods_ID", new SimpleLabel("存货"),
                       QueryCreator.DFChoiceBoxEnableMultiSelection(mDFInfo.Fields["ID"], mQueryContainer, "Goods_ID", B3UnitedInfosConsts.DataSources.存货));
            layout["Goods_ID"].NotAutoAddToContainer = true;

            var state = mQueryContainer.Add(B3ButcheryCustomInputCreator.一般单据状态(mDFInfo.Fields["BillState"], true, false, true, true), "BillState");

            ((ChoiceBox)state).Value  = 单据状态.已审核.Value.ToString() + "|";
            state.DisplayValue        = "已审核;";
            state.EnableInputArgument = true;
            layout.Add("BillState", state);
            layout["BillState"].NotAutoAddToContainer = true;


            var config = new AutoLayoutConfig {
                Cols = 2
            };

            config.Add("ID");
            config.Add("AccountingUnit_ID");
            config.Add("Date");
            config.Add("Department_ID");
            config.Add("Employee_ID");
            config.Add("Store_ID");
            config.Add("Goods_ID");
            config.Add("BillState");
            layout.Config = config;

            vPanel.Add(layout.CreateLayout());
        }
Example #24
0
 protected override void AddQueryControls(VLayoutPanel vPanel)
 {
     vPanel.Add(CreateDefaultBaseInfoQueryControls((panel, config) =>
     {
         config.AddAfter("AccountingUnit_ID", "ID");
         config.AddAfter("Department_ID", "AccountingUnit_ID");
         config.AddAfter("ProductLinks_ID", "Department_ID");
         config.AddAfter("CollectType", "ProductLinks_ID");
     }));
 }
Example #25
0
 protected override void AddQueryControls(VLayoutPanel vPanel)
 {
     vPanel.Add(CreateDefaultBaseInfoQueryControls((panel, config) =>
     {
         config.AddAfter("AccountingUnit_ID", "ID");
         config.AddAfter("Department_ID", "AccountingUnit_ID");
         config.AddAfter("InStoreType_ID", "Department_ID");
         config.AddAfter("Employee_ID", "InStoreType_ID");
     }));
 }
Example #26
0
 protected override void AddQueryControls(VLayoutPanel vPanel)
 {
     vPanel.Add(CreateDefaultBaseInfoQueryControls((panel, config) =>
     {
         panel.Add("ProductLine_ID", QueryCreator.DFChoiceBox(mDFInfo.Fields["ProductLine_ID"], B3ButcheryDataSource.生产线));
         panel.Add("ChargePerson_ID", QueryCreator.DFChoiceBox(mDFInfo.Fields["ChargePerson_ID"], DataKind.授权员工全部));
         config.AddBefore("ProductLine_ID", "Remark");
         config.AddBefore("ChargePerson_ID", "ProductLine_ID");
     }));
 }
Example #27
0
        private void AddQueryResult(VLayoutPanel vPanel)
        {
            _mGrid = vPanel.Add(new DFBrowseGrid(new DFDataTableEditor())
            {
                Width = Unit.Percentage(100), MultiSelectionEnabled = true
            });
            _mGrid.Columns.Add(new DFBrowseGridAutoColumn());

            AddUpdatePanel(vPanel);
        }
Example #28
0
 protected override void AddQueryControls(VLayoutPanel vPanel)
 {
     vPanel.Add(CreateDefaultBaseInfoQueryControls((layoutManager, config) =>
     {
         layoutManager.Add("存货属性分类", new SimpleLabel("属性分类"), QueryCreator.DFChoiceBox(mDFInfo.Fields["ID"], B3UnitedInfosConsts.DataSources.存货属性分类));
         config.AddAfter("GoodsProperty_ID", "ID");
         config.AddBefore("存货属性分类", "GoodsProperty_ID");
         config.Add("ProductShift_ID");
         config.Add("PackageModel");
     }));
 }
Example #29
0
        protected override void AddQueryControls(VLayoutPanel vPanel)
        {
            var customPanel = new LayoutManager("Main", mainInfo, mQueryContainer);

            customPanel.Add("ID", QueryCreator.DFTextBox(mainInfo.Fields["ID"]));
            customPanel.Add("AccountingUnit_ID", QueryCreator.DFChoiceBoxEnableMultiSelection(mainInfo.Fields["AccountingUnit_ID"], mQueryContainer, "AccountingUnit_ID", DataKind.授权会计单位全部));
            customPanel["AccountingUnit_ID"].NotAutoAddToContainer = true;
            customPanel.Add("Department_ID", QueryCreator.DFChoiceBoxEnableMultiSelection(mainInfo.Fields["Department_ID"], mQueryContainer, "Department_ID", DataKind.授权部门全部));
            customPanel["Department_ID"].NotAutoAddToContainer = true;
            customPanel.Add("Store_ID", _storeInput            = QueryCreator.DFChoiceBoxEnableMultiSelection(mainInfo.Fields["Store_ID"], mQueryContainer, "Store_ID", DataKind.授权仓库全部), false);
            customPanel["Store_ID"].NotAutoAddToContainer      = true;
            customPanel.Add("InStoreType_ID", QueryCreator.DFChoiceBoxEnableMultiSelection(mainInfo.Fields["InStoreType_ID"], mQueryContainer, "InStoreType_ID", B3ButcheryDataSource.屠宰分割入库类型全部));
            customPanel["InStoreType_ID"].NotAutoAddToContainer = true;
            customPanel.Add("CheckDate", QueryCreator.DateRange(mainInfo.Fields["CheckDate"], mQueryContainer, "MinCheckDate", "MaxCheckDate"));

            customPanel.Add("InStoreDate", new SimpleLabel("生产日期"), QueryCreator.DateRange(detailInfo.Fields["ProductionDate"], mQueryContainer, "MinProductionDate", "MaxProductionDate"));
            customPanel.Add("ProductPlan_ID", new SimpleLabel("生产计划号"), QueryCreator.DFChoiceBoxEnableMultiSelection(detailInfo.Fields["ProductPlan_ID"], mQueryContainer, "ProductPlan_ID", B3ButcheryDataSource.计划号));
            customPanel["ProductPlan_ID"].NotAutoAddToContainer = true;
            customPanel.Add("Remark", QueryCreator.DFTextBox(mainInfo.Fields["Remark"]));
            DFChoiceBox goodsInput;

            customPanel.Add("Goods_ID", new SimpleLabel("存货名称"), goodsInput = QueryCreator.DFChoiceBoxEnableMultiSelection(detailInfo.Fields["Goods_ID"], mQueryContainer, "Goods_ID", B3ButcheryDataSource.存货带编号全部));
            goodsInput.PlaceHolder = "名称 编号 简拼";
            customPanel["Goods_ID"].NotAutoAddToContainer = true;
            customPanel.Add("Origin", new SimpleLabel("存货产地"), goodsOrigin   = QueryCreator.DFTextBox(detailInfo.Fields["Goods_Code"]));
            customPanel.Add("Goods_Name", new SimpleLabel("存货名称"), goodsName = QueryCreator.DFTextBox(detailInfo.Fields["Goods_Name"]));
            customPanel.Add("Goods_Code", new SimpleLabel("存货编号"), QueryCreator.DFTextBox(detailInfo.Fields["Goods_Code"]));
            customPanel.Add("Goods_Brand", new SimpleLabel("存货品牌"), QueryCreator.DFChoiceBox(detailInfo.Fields["Goods_Name"], B3ButcheryDataSource.存货品牌));
            customPanel.Add("GoodsProperty_ID", new SimpleLabel("存货属性"), QueryCreator.DFChoiceBox(detailInfo.Fields["ID"], B3UnitedInfos.B3UnitedInfosConsts.DataSources.存货属性全部));
            customPanel.Add("PropertyCatalog_ID", new SimpleLabel("属性分类"), QueryCreator.DFChoiceBox(detailInfo.Fields["ID"], B3UnitedInfos.B3UnitedInfosConsts.DataSources.存货属性分类全部));
            customPanel.Add("DRemark", new SimpleLabel("备注"), QueryCreator.DFTextBox(detailInfo.Fields["Remark"]));
            customPanel.Add("CargoSpace_ID", new SimpleLabel("货位"), cargoSpaceName = QueryCreator.DFChoiceBoxEnableMultiSelection(detailInfo.Fields["CargoSpace_ID"], mQueryContainer, "CargoSpace_ID", B3ButcheryDataSource.货位), false);
            customPanel["CargoSpace_ID"].NotAutoAddToContainer = true;

            customPanel.Add("ProductLine_ID", new SimpleLabel("产品线"), _productLine = QueryCreator.DFChoiceBoxEnableMultiSelection(detailInfo.Fields["ID"], mQueryContainer, "ProductLine_ID", B3UnitedInfosConsts.DataSources.产品线全部));
            customPanel["ProductLine_ID"].NotAutoAddToContainer = true;

            customPanel.Add("ProductLineCategory_ID", new SimpleLabel("产品线分类"), _producttypeLine = QueryCreator.DFChoiceBoxEnableMultiSelection(detailInfo.Fields["ID"], mQueryContainer, "ProductLineCategory_ID", B3UnitedInfosConsts.DataSources.产品线分类));
            customPanel["ProductLineCategory_ID"].NotAutoAddToContainer = true;



            AddOtherQuery(customPanel, mainInfo);
            customPanel.Add("BillState", QueryCreator.一般单据状态(mainInfo.Fields["BillState"]));
            if (_useBrand)
            {
                customPanel.Add("BrandItem_ID", new SimpleLabel("品牌项"), QueryCreator.DFChoiceBoxEnableMultiSelection(detailInfo.Fields["ID"], B3UnitedInfosConsts.DataSources.品牌项));
            }
            var config = customPanel.CreateDefaultConfig(4);

            config.Expand = false;
            TagWebUtil.AddTagQueryInput(mDmoTypeID, customPanel, config, mQueryContainer);
            vPanel.Add(customPanel.CreateLayout());
        }
Example #30
0
        private void CreateQueryGrid(VLayoutPanel vPanel)
        {
            _grid = new DFBrowseGrid(new DFDataTableEditor())
            {
                Width = Unit.Percentage(100)
            };
            _grid.MultiSelectionEnabled = true;
            CreateQueryGridColumns(_grid);
            var hPanel = new HLayoutPanel()
            {
                Align = HorizontalAlign.Left
            };

            vPanel.Add(_grid);
            var button = new TSButton("选中");

            hPanel.Add(button);
            vPanel.Add(hPanel);
            button.Click += GridMultiSelection;
        }