コード例 #1
0
        private void MaterialItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            switch (e.Item.Name)
            {
            case "MaterialMessage_DirectAdd_BarButtonItem":
                var addMaterial = new AddMaterialInfor();
                var material    = new Material();
                material.Material_Type_Id = Convert.ToInt32(material_Type_Id);
                addMaterial.material      = material;
                addMaterial.Show();
                break;

            case "MaterialMessage_AnalogyAdd_BarButtonItem":
                material = materialService.GetAllMaterial().Find(m => m.Id == Convert.ToInt32(material_Id));
                var analogyAdd = new AddMaterialInfor();
                analogyAdd.Tag      = "AnalogyAdd";
                analogyAdd.material = material;
                analogyAdd.ShowDialog();
                break;

            case "MaterialMessage_Delete_BarButtonItem":
                DeleteMaterial();
                break;

            case "MaterialMessage_Modify_BarButtonItem":
                material = materialService.GetAllMaterial().Find(m => m.Id == Convert.ToInt32(material_Id));
                var modifyMaterial = new AddMaterialInfor();
                modifyMaterial.material = material;
                modifyMaterial.Tag      = "Modify";
                modifyMaterial.Text     = "修改物料信息";
                modifyMaterial.ShowDialog();
                break;
            }
        }
コード例 #2
0
ファイル: CheckResult.cs プロジェクト: gofixiao/HYPDM_Pro
 private void CheckResult_Modify_BarButtonItem_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     MaterbasePro = (MaterialBaseProperty)PartsMange_MaterialReviewRuleManage_CheckResult_Material_GridView.GetFocusedRow();
     AddMaterialInfor AM = new AddMaterialInfor();
     AM.Tag = "Modify";
     //AM.MaterBase = MaterbasePro;
     AM.ShowDialog();
 }
コード例 #3
0
        private void CheckResult_Modify_BarButtonItem_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            MaterbasePro = (MaterialBaseProperty)PartsMange_MaterialReviewRuleManage_CheckResult_Material_GridView.GetFocusedRow();
            AddMaterialInfor AM = new AddMaterialInfor();

            AM.Tag = "Modify";
            //AM.MaterBase = MaterbasePro;
            AM.ShowDialog();
        }
コード例 #4
0
        private void PartsMange_MaterialReviewRuleManage_CheckResult_SelectAlreadyMaterial_SimpleButton_Click(object sender, EventArgs e)
        {
            MaterbasePro = (MaterialBaseProperty)PartsMange_MaterialReviewRuleManage_CheckResult_Material_GridView.GetFocusedValue();
            AddMaterialInfor AM = new AddMaterialInfor();

            AM.Tag = "select";
            //AM.MaterBase = MaterbasePro;
            AM.ShowDialog();
        }
コード例 #5
0
        private void MaterialTypeItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            switch (e.Item.Name)
            {
            case "MaterialType_Add_Parent_BarButtonItem":
                TreeAddParnetORChild(Convert.ToInt32(parent_Id));
                break;

            case "MaterialType_Add_Child_BarButtonItem":
                TreeAddParnetORChild(Convert.ToInt32(material_Type_Id));
                break;

            case "MaterialType_Delete_BarButtonItem":
                DeleteMaterialType();
                break;

            case "MaterialType_Modify_BarButtonItem":
                var materialType = materialTypeList.Find(t => t.Id == Convert.ToInt32(material_Type_Id));
                var modifyType   = new AddType();
                modifyType.Text = "修改物料类型";
                modifyType.type = materialType;
                modifyType.ShowDialog();
                if (modifyType.DialogResult == DialogResult.OK)
                {
                    materialTypeList.Remove(materialType);
                    materialTypeList.Add(modifyType.type);
                    TreeDataBind(materialTypeList);
                }
                break;

            case "btnMaterialAdd":
                var addMaterial = new AddMaterialInfor();
                var material    = new Material();
                material.Material_Type_Id = Convert.ToInt32(material_Type_Id);
                addMaterial.material      = material;
                addMaterial.ShowDialog();
                break;
            }
        }
コード例 #6
0
        private void CheckResult_Add_BarButtonItem_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            AddMaterialInfor AM = new AddMaterialInfor();

            AM.ShowDialog();
        }
コード例 #7
0
ファイル: CheckResult.cs プロジェクト: gofixiao/HYPDM_Pro
 private void PartsMange_MaterialReviewRuleManage_CheckResult_SelectAlreadyMaterial_SimpleButton_Click(object sender, EventArgs e)
 {
     MaterbasePro =(MaterialBaseProperty)PartsMange_MaterialReviewRuleManage_CheckResult_Material_GridView.GetFocusedValue();
     AddMaterialInfor AM = new AddMaterialInfor();
     AM.Tag = "select";
     //AM.MaterBase = MaterbasePro;
     AM.ShowDialog();
 }
コード例 #8
0
ファイル: CheckResult.cs プロジェクト: gofixiao/HYPDM_Pro
 private void CheckResult_Add_BarButtonItem_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     AddMaterialInfor AM = new AddMaterialInfor();
     AM.ShowDialog();
 }
コード例 #9
0
 private void MaterialTypeItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     switch (e.Item.Name)
     {
         case "MaterialType_Add_Parent_BarButtonItem":
             TreeAddParnetORChild(Convert.ToInt32(parent_Id));
             break;
         case "MaterialType_Add_Child_BarButtonItem":
             TreeAddParnetORChild(Convert.ToInt32(material_Type_Id));
             break;
         case "MaterialType_Delete_BarButtonItem":
             DeleteMaterialType();
             break;
         case "MaterialType_Modify_BarButtonItem":
             var materialType = materialTypeList.Find(t => t.Id == Convert.ToInt32(material_Type_Id));
             var modifyType = new AddType();
             modifyType.Text = "修改物料类型";
             modifyType.type = materialType;
             modifyType.ShowDialog();
             if (modifyType.DialogResult == DialogResult.OK)
             {
                 materialTypeList.Remove(materialType);
                 materialTypeList.Add(modifyType.type);
                 TreeDataBind(materialTypeList);
             }
             break;
         case "btnMaterialAdd":
             var addMaterial = new AddMaterialInfor();
             var material = new Material();
             material.Material_Type_Id = Convert.ToInt32(material_Type_Id);
             addMaterial.material = material;
             addMaterial.ShowDialog();
             break;
     }
 }
コード例 #10
0
 private void MaterialItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     switch (e.Item.Name)
     {
         case "MaterialMessage_DirectAdd_BarButtonItem":
             var addMaterial = new AddMaterialInfor();
             var material = new Material();
             material.Material_Type_Id = Convert.ToInt32(material_Type_Id);
             addMaterial.material = material;
             addMaterial.Show();
             break;
         case "MaterialMessage_AnalogyAdd_BarButtonItem":
             material = materialService.GetAllMaterial().Find(m => m.Id == Convert.ToInt32(material_Id));
             var analogyAdd = new AddMaterialInfor();
             analogyAdd.Tag = "AnalogyAdd";
             analogyAdd.material = material;
             analogyAdd.ShowDialog();
             break;
         case "MaterialMessage_Delete_BarButtonItem":
             DeleteMaterial();
             break;
         case "MaterialMessage_Modify_BarButtonItem":
             material = materialService.GetAllMaterial().Find(m => m.Id == Convert.ToInt32(material_Id));
             var modifyMaterial = new AddMaterialInfor();
             modifyMaterial.material = material;
             modifyMaterial.Tag = "Modify";
             modifyMaterial.Text = "修改物料信息";
             modifyMaterial.ShowDialog();
             break;
     }
 }