public PowerEdit(string text, LineProductMesEntityu.PowerEntity entity, string nameOfPerson, string nameOfProgram, string sign) { InitializeComponent( ); _bll = new LineProductMesBll.Bll.PowerBll( ); _model = new LineProductMesEntityu.PowerEntity( ); this.Text = text; this.sign = sign; this._model = entity; this.nameOfPerson = nameOfPerson; this.nameOfProgram = nameOfProgram; if (sign.Equals("edit")) { lupNamePerson.Enabled = lupNamePro.Enabled = false; } else { lupNamePerson.Enabled = lupNamePro.Enabled = true; } lupNamePerson.Properties.DataSource = _bll.GetPerson( ); lupNamePerson.Properties.DisplayMember = "EMP002"; lupNamePerson.Properties.ValueMember = "EMP001"; lupNamePro.Properties.DataSource = _bll.GetProgram( ); lupNamePro.Properties.DisplayMember = "FOR004"; lupNamePro.Properties.ValueMember = "FOR003"; }
public FormPower( ) { InitializeComponent( ); GridViewMoHuSelect.SetFilter(gridView1); FieldInfo fi = typeof(XPaint).GetField("graphics", BindingFlags.Static | BindingFlags.NonPublic); fi.SetValue(null, new DrawXPaint( )); _bll = new LineProductMesBll.Bll.PowerBll( ); _model = new LineProductMesEntityu.PowerEntity( ); ToolBarContain.ToolbarsC(barTool, new DevExpress.XtraBars.BarItem [] { toolExport, toolPrint, toolCancellation, toolExamin }); lookUpEdit1.Properties.DataSource = _bll.GetPerson( ); lookUpEdit1.Properties.DisplayMember = "EMP002"; lookUpEdit1.Properties.ValueMember = "EMP001"; tablePro = _bll.GetProgram( ); lookUpEdit2.Properties.DataSource = tablePro; lookUpEdit2.Properties.DisplayMember = "FOR004"; lookUpEdit2.Properties.ValueMember = "FOR003"; gridView1.OptionsBehavior.Editable = false; }