private void setCondition() { //绑定表数据 ASPxGridView1.DataSource = WorkShopFactory.GetAll(); ASPxGridView1.DataBind(); }
protected void WorkshopCode_DataBinding(object sender, EventArgs e) { ASPxComboBox workshop = (ASPxComboBox)sender; workshop.DataSource = WorkShopFactory.GetAll(); workshop.ValueField = "WORKSHOP_CODE"; workshop.TextField = "WORKSHOP_NAME"; }
private void initComboBoxByCompany() { initing = true; object val = null; val = comboBox1.SelectedValue; try { if (val != null) { comboBox2.DataSource = ProductLineFactory.GetByCompanyCode(val.ToString()); comboBox2.SelectedValue = DB.ReadConfigLocal("PRODUCTLINE_CODE"); setComboxBoxCurrent(comboBox2); val = comboBox2.SelectedValue; if (val != null) { comboBox3.DataSource = StationFactory.GetByProductLine(val.ToString()); } else { List <StationEntity> stas = StationFactory.GetAll(); var sta1 = from ss in stas where ss.COMPANY_CODE == LoginInfo.CompanyInfo.COMPANY_CODE select ss; comboBox3.DataSource = sta1.ToList <StationEntity>(); } comboBox6.SelectedValue = DB.ReadConfigLocal("WORKSHOP_CODE"); comboBox6.DataSource = WorkShopFactory.GetAll(); setComboxBoxCurrent(comboBox6); comboBox3.SelectedValue = DB.ReadConfigLocal("STATION_CODE"); setComboxBoxCurrent(comboBox3); comboBox4.DataSource = ShiftFactory.GetAll(); comboBox4.SelectedValue = DB.ReadConfigLocal("SHIFT_CODE"); setComboxBoxCurrent(comboBox4); comboBox5.DataSource = TeamFactory.GetByPlineCode(val.ToString()); comboBox5.SelectedValue = DB.ReadConfigLocal("TEAM_CODE"); setComboxBoxCurrent(comboBox5); } } catch { } initing = false; }
private void setCondition() { //绑定表数据 string sql = "select * from REL_WORKSHOP_PLINE where pline_code in (select pline_code from vw_user_role_program where user_id='" + theUserId + "' and program_code='" + theProgramCode + "' and company_code='" + theCompanyCode + "') order by workshop_code"; DataTable dt = dc.GetTable(sql); ASPxGridView1.DataSource = dt; GridViewDataComboBoxColumn col = ASPxGridView1.Columns["PLINE_CODE"] as GridViewDataComboBoxColumn; col.PropertiesComboBox.DataSource = ProductLineFactory.GetByUserID(theUserId, theProgramCode); col.PropertiesComboBox.ValueField = "PLINE_CODE"; col.PropertiesComboBox.TextField = "PLINE_NAME"; ASPxComboBox plinecode = new ASPxComboBox(); GridViewDataComboBoxColumn col1 = ASPxGridView1.Columns["WORKSHOP_CODE"] as GridViewDataComboBoxColumn; col1.PropertiesComboBox.DataSource = WorkShopFactory.GetAll(); col1.PropertiesComboBox.ValueField = "WORKSHOP_CODE"; col1.PropertiesComboBox.TextField = "WORKSHOP_NAME"; ASPxGridView1.DataBind(); }