示例#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.wMSM105MatGetBindingSource.DataSource        = tempData;
            var matDetailList = matGetService.GetMatDetailQuery().Where(a => a.RequestNo == tempData.RequestNo).ToList();
            var count         = matDetailList.Count;

            for (int i = 0; i < 20 - count; i++)
            {
                WMS_M105_MatGetDetail bomMat = new WMS_M105_MatGetDetail();
                bomMat.RequestNo = tempData.RequestNo;
                matDetailList.Add(bomMat);
            }
            this.wMSM105MatGetDetailBindingSource.DataSource = matDetailList;
        }
示例#2
0
        void wMSM105MatGetBindingSource_CurrentChanged(object sender, EventArgs e)
        {
            WMS_M105_MatGet temp = this.wMSM105MatGetBindingSource.Current as WMS_M105_MatGet;

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