public void loadcell() { ds = objserver.GetDateset("select '0','-Select-' Cell union select Id,Cell from Cell "); Slct_Cell_QC.DataSource = ds.Tables[0]; Slct_Cell_QC.DataValueField = "Cell"; Slct_Cell_QC.DataTextField = "Cell"; Slct_Cell_QC.DataBind(); }
protected void onselectedindexchanged_QC(object sender, EventArgs e) { string unit = ddl_unit_QC.Text.ToString(); if (unit == "MBU") { //ds = objserver.GetDateset("select '-Select-' MBU,'-Select-' MBU union select distinct MBU,MBU from Machine_rpt_tble order by 1 asc"); //Slct_machine_QC.DataSource = ds.Tables[0]; //Slct_machine_QC.DataValueField = "MBU"; //Slct_machine_QC.DataTextField = "MBU"; //Slct_machine_QC.DataBind(); ds = objserver.GetDateset("select '0','-Select-' Cell union select Id,Cell from Cell "); Slct_Cell_QC.DataSource = ds.Tables[0]; Slct_Cell_QC.DataValueField = "Cell"; Slct_Cell_QC.DataTextField = "Cell"; Slct_Cell_QC.DataBind(); } else if (unit == "ABU") { //ds = objserver.GetDateset("select '-Select-' ABU,'-Select-' ABU union select distinct ABU,ABU from Machine_rpt_tble order by 1 asc"); //Slct_machine_QC.DataSource = ds.Tables[0]; //Slct_machine_QC.DataValueField = "ABU"; //Slct_machine_QC.DataTextField = "ABU"; //Slct_machine_QC.DataBind(); } else if (unit == "ALL") { //ds = objserver.GetDateset("SELECT '-Select-' ALLRPT,'-Select-' ALLRPT union select distinct MBU,MBU as ALLRPT FROM Machine_rpt_tble where MBU<>'' UNION ALL SELECT '-Select-' ALLRPT,'-Select-' ALLRPT union select distinct ABU,ABU as ALLRPT FROM Machine_rpt_tble where ABU<>'' "); //Slct_machine_QC.DataSource = ds.Tables[0]; //Slct_machine_QC.DataValueField = "ALLRPT"; //Slct_machine_QC.DataTextField = "ALLRPT"; //Slct_machine_QC.DataBind(); } }