private void dgWP_DoubleClick(object sender, EventArgs e) { if (PICK == true) { if (dgWP.SelectedRows.Count == 0) { MessageBox.Show("Выберите изделие!"); return; } PickedID = (int)dgWP.SelectedRows[0].Cells["ID"].Value; if (cbPRODUCTTYPE.SelectedIndex == 0) { PickedType = WPTYPE.WPNAMELIST; } if (cbPRODUCTTYPE.SelectedIndex == 1) { PickedType = WPTYPE.ZHGUTLIST; } if (cbPRODUCTTYPE.SelectedIndex == 2) { PickedType = WPTYPE.CABLELIST; } Close(); } }
public fEditPackage(WPTYPE wpt, int idwp, IRole uvo) { InitializeComponent(); this.WPT = wpt; this.IDWP = idwp; this.UVO = uvo; }
public void Init(int ID, WPTYPE WPT, IRole uvo, SummonVO svo) { PickedProduct = ProductFactory.Create(ID, WPT); textBox1.Text = PickedProduct.GetName(); this.UVO = uvo; this.SVO = svo; }
public void Init(WPTYPE wpt, int idwp, bool require, bool enabled, bool require_visible, bool require_enabled, Roles resprole, Roles currole, IRole uvo) { this.ResposibleRole = resprole; this.CurrentRole = currole; this.WPT = wpt; this.IDWP = idwp; this.Required = require; this.RequiredVisible = require_visible; this.checkBox1.Enabled = require_enabled; this.Enabled = enabled; this.UVO = uvo; ShowDGV(); }
public static string ToString(WPTYPE WPT) { switch (WPT) { case WPTYPE.WPNAMELIST: return("WPNAMELIST"); case WPTYPE.ZHGUTLIST: return("ZHGUTLIST"); case WPTYPE.CABLELIST: return("CABLELIST"); } return(""); }
public PickIntoPackage(IRole uvo, WPTYPE wpt) { InitializeComponent(); this.WPT = wpt; if (WPT == WPTYPE.ZHGUTLIST) { this.Text = "Выбор жгута для комплекта жгутов рабочего изделия"; } if (WPT == WPTYPE.CABLELIST) { this.Text = "Выбор кабеля для комплекта кабелей рабочего изделия"; } this.UVO = uvo; }
public WPName(bool pick, IRole uvo, WPTYPE wpt, bool pick_for_change) { InitializeComponent(); this.WPT = wpt; this.UVO = uvo; this.PICK = pick; if (WPT == WPTYPE.WPNAMELIST) { //cbPRODUCTTYPE.Enabled = false; cbPRODUCTTYPE.SelectedIndex = 0; } if (WPT == WPTYPE.ZHGUTLIST) { //cbPRODUCTTYPE.Enabled = false; cbPRODUCTTYPE.SelectedIndex = 1; } if (WPT == WPTYPE.CABLELIST) { //cbPRODUCTTYPE.Enabled = false; cbPRODUCTTYPE.SelectedIndex = 2; } if (pick) { bChoose.Visible = true; bChoose.Enabled = true; bAdd.Visible = false; bEdit.Visible = false; bClone.Visible = false; bDelete.Visible = false; bEditCategory.Visible = false; bEditSubCategory.Visible = false; } else { bChoose.Visible = false; } if (pick_for_change) { cbPRODUCTTYPE.Enabled = false; } }
private void bChoose_Click(object sender, EventArgs e)//Выбрать { if (dgWP.SelectedRows.Count == 0) { MessageBox.Show("Выберите изделие!"); return; } PickedID = (int)dgWP.SelectedRows[0].Cells["ID"].Value; if (WPT == WPTYPE.ZHGUTLIST) { PickedType = WPTYPE.ZHGUTLIST; } if (WPT == WPTYPE.CABLELIST) { PickedType = WPTYPE.CABLELIST; } Close(); }
internal static IProduct Create(int ID, WPTYPE wPTYPE) { return(ProductFactory.Create(ID, WPTYPETOSTRING.ToString(wPTYPE))); }