Exemplo n.º 1
0
        protected override void InitData()
        {
            var materialList = materialService.GetMaterial().ToList().Select(a => new InputItem {
                Value = a.MatCode, DisPlayName = a.MatCode, InputCode1 = a.MatName, InputCode2 = a.MatSpec, InputCode3 = a.MatClass2
            }).ToList();

            SetGridLookUpEdit(repositoryItemMatSpecCode, materialList, 3);
            //SetGridLookUpEdit(RemarksTextEdit, materialList, "物料代号", "物料名称");
            repositoryItemMatSpecCode.View.Columns[0].Caption = "物料代号";
            repositoryItemMatSpecCode.View.Columns[1].Caption = "物料名称";
            repositoryItemMatSpecCode.View.Columns[2].Caption = "物料规格";
            repositoryItemMatSpecCode.View.Columns[3].Caption = "材质";
            suppList = supplierService.GetSuppler().ToList().Select(a => new InputItem {
                Value = a.SuppCode, DisPlayName = a.Alias, InputCode1 = a.SuppCode
            }).ToList();
            SetGridLookUpEdit(repositoryItemSupplier, suppList, 1);
            repositoryItemMatSpecCode.View.Columns[0].Caption = "供应商简称";
            repositoryItemMatSpecCode.View.Columns[1].Caption = "供应商编号";
            this.wMSM105MatReturnBindingSource.DataSource     = tempData;
            var matDetailList = matReturnService.GetMatDetailQuery().Where(a => a.ReturnNo == tempData.ReturnNo).ToList();
            var count         = matDetailList.Count;

            for (int i = 0; i < 20 - count; i++)
            {
                WMS_M105_MatReturnDetail bomMat = new WMS_M105_MatReturnDetail();
                bomMat.ReturnNo = tempData.ReturnNo;
                matDetailList.Add(bomMat);
            }
            this.wMSM105MatReturnDetailBindingSource.DataSource = matDetailList;
        }
Exemplo n.º 2
0
        void wMSM105MatReturnBindingSource_CurrentChanged(object sender, EventArgs e)
        {
            WMS_M105_MatReturn temp = this.wMSM105MatReturnBindingSource.Current as WMS_M105_MatReturn;

            if (temp != null)
            {
                this.wMSM105MatReturnDetailBindingSource.DataSource = matGetService.GetMatDetailQuery().Where(a => a.ReturnNo == temp.ReturnNo).ToList();
            }
        }