private void TreeListCustomDrawNodeCell(object sender, DevExpress.XtraTreeList.CustomDrawNodeCellEventArgs e) { if (!e.Column.FieldName.Equals("Material_Id")) return; var m = new Test.BOMData().GetMaterialById(Convert.ToInt32(e.CellValue)); if (m == null) return; e.CellText = m.No + "," + m.Version + "," + m.Name + "," + "1000"; }
private void MaterialDataLoad(int materialId) { var m = new Test.BOMData().GetMaterialById(materialId); if (m == null) return; txtMaterialNo.Text = m.No; txtMaterialName.Text = m.Name; txtMaterialVersion.Text = m.Version; }
private void SelectExistingFile_Load(object sender, EventArgs e) { simpleButton7.Click += new EventHandler(SelectParts); bmReferMaterial.ItemClick += ReferMaterialItemClick; gridView1.RowClick += new DevExpress.XtraGrid.Views.Grid.RowClickEventHandler(GridViewRowClick); var materialList = new Test.BOMData().GetAllMaterial(); gridControl1.DataSource = materialList; TreeDataBind(); }
/// <summary> /// 文档清单 /// </summary> /// <param name="_materialId"></param> private void DocListDataBind(int _materialId) { var docList = new Test.BOMData().GetDocumentByPartId(_materialId); var docList1 = new Test.BOMData().GetDocumentByPartId(_materialId); var docMaterailList = new Test.BOMData().GetAllDocParts(); //gridControl1.DataSource = docList; gridControl4.DataSource = docList; gridControl5.DataSource = docMaterailList; }
private void SelectExistingFile_Load(object sender, EventArgs e) { simpleButton7.Click += new EventHandler(SelectParts); bmReferMaterial.ItemClick += ReferMaterialItemClick; gridView1.RowClick += new DevExpress.XtraGrid.Views.Grid.RowClickEventHandler(GridViewRowClick); var materialList = new Test.BOMData().GetAllMaterial(); gridControl1.DataSource = materialList; TreeDataBind(); }
/// <summary> /// 基础属性 /// </summary> /// <param name="_materialId"></param> private void BasePropertyDataLoad(int _materialId) { var m = new Test.BOMData().GetMaterialById(_materialId); if (m == null) { return; } txtMaterialNo.Text = m.No; txtMaterialName.Text = m.Name; txtMaterialVersion.Text = m.Version; }
private void DataBind() { var supplier = new Test.BOMData().GetSupplierById(Id); if (supplier == null) return; txtSupplierName.Text = supplier.Name; txtSupplierType.Text = supplier.Type; txtSupplierAddr.Text = supplier.Address; txtSupplierCategory.Text = supplier.Category; txtSupplierPhone.Text = supplier.Phone; txtSupplierRemark.Text = supplier.Remark; txtSupplierWebSite.Text = supplier.WebSite; txtSupplierZipCode.Text = supplier.ZipCode; }
private void BOMStructTreeList_Load(object sender, EventArgs e) { //1.事件绑定 StructTree.CustomDrawNodeCell += TreeListCustomDrawNodeCell; //StructTree.AfterFocusNode += TreeListAfterFocusedNode; StructTree.MouseUp += TreeListMouseUp; //2.数据加载 var structList = new List<BOM_Struct>(); structList = new Test.BOMData().GetAllStructByBOMId(_bomId); TreeListDataBind(structList); //3.右键操作 //4.节点操作 }
private void TreeListCustomDrawNodeCell(object sender, DevExpress.XtraTreeList.CustomDrawNodeCellEventArgs e) { if (!e.Column.FieldName.Equals("Material_Id")) { return; } var m = new Test.BOMData().GetMaterialById(Convert.ToInt32(e.CellValue)); if (m == null) { return; } e.CellText = m.No + "," + m.Version + "," + m.Name + "," + "1000"; }
private void BOMStructTreeList_Load(object sender, EventArgs e) { //1.事件绑定 StructTree.CustomDrawNodeCell += TreeListCustomDrawNodeCell; //StructTree.AfterFocusNode += TreeListAfterFocusedNode; StructTree.MouseUp += TreeListMouseUp; //2.数据加载 var structList = new List <BOM_Struct>(); structList = new Test.BOMData().GetAllStructByBOMId(_bomId); TreeListDataBind(structList); //3.右键操作 //4.节点操作 }
private void DataBind() { var supplier = new Test.BOMData().GetSupplierById(Id); if (supplier == null) { return; } txtSupplierName.Text = supplier.Name; txtSupplierType.Text = supplier.Type; txtSupplierAddr.Text = supplier.Address; txtSupplierCategory.Text = supplier.Category; txtSupplierPhone.Text = supplier.Phone; txtSupplierRemark.Text = supplier.Remark; txtSupplierWebSite.Text = supplier.WebSite; txtSupplierZipCode.Text = supplier.ZipCode; }
private Material GetMaterial(int id) { var m = new Test.BOMData().GetMaterialById(id); //productStructService.GetMaterialById(id); return m; }
private Material GetMaterial(int id) { var m = new Test.BOMData().GetMaterialById(id); //productStructService.GetMaterialById(id); return(m); }