protected void onselectedindexchanged_laboreff(object sender, EventArgs e) { string unit = ddl_unit_LBeff.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_eff_LE.DataSource = ds.Tables[0]; Slct_machine_eff_LE.DataValueField = "MBU"; Slct_machine_eff_LE.DataTextField = "MBU"; Slct_machine_eff_LE.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_eff_LE.DataSource = ds.Tables[0]; Slct_machine_eff_LE.DataValueField = "ABU"; Slct_machine_eff_LE.DataTextField = "ABU"; Slct_machine_eff_LE.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_eff_LE.DataSource = ds.Tables[0]; // Slct_machine_eff_LE.DataValueField = "ALLRPT"; // Slct_machine_eff_LE.DataTextField = "ALLRPT"; // Slct_machine_eff_LE.DataBind(); //} }
private void BindPart() { ds = objserver.GetDateset("select '-Select-' Partno,'-Select-' Partno union select distinct partno,Partno from tbl_PartNo order by 1 desc"); DropPart_cyc.DataValueField = "Partno"; DropPart_cyc.DataTextField = "Partno"; DropPart_cyc.DataSource = ds.Tables[0]; DropPart_cyc.DataBind(); }
private void BindOperation() { ds = objserver.GetDateset("select '-Select-' Process,'-Select-' Process union select distinct Process,Process from tbl_Process order by 1 asc"); DropFirstSetUp.DataSource = ds.Tables[0]; DropFirstSetUp.DataValueField = "Process"; DropFirstSetUp.DataTextField = "Process"; DropFirstSetUp.DataBind(); }
private void BindPartNumber() { ds = objserver.GetDateset("select '--- Select Part Number ---' PartNo union select distinct PartNo from tbl_PartNo"); ddl_partnumber.DataSource = ds.Tables[0]; ddl_partnumber.DataValueField = "PartNo"; ddl_partnumber.DataTextField = "PartNo"; ddl_partnumber.DataBind(); }
private void BindPartNO() { ds = objserver.GetDateset("select '-Select-' partno,'-Select-' partno union select distinct partno,partno from tbl_PartNo order by 1 desc"); ddl_partno.DataSource = ds.Tables[0]; ddl_partno.DataValueField = "PartNo"; ddl_partno.DataTextField = "PartNo"; ddl_partno.DataBind(); }
private void BindUnit() { ds = objserver.GetDateset("select '0' MValue,'--- Select Unit ---' MText union select distinct MValue,MText from UnitMaster"); ddl_unit.DataSource = ds.Tables[0]; ddl_unit.DataValueField = "MValue"; ddl_unit.DataTextField = "MText"; ddl_unit.DataBind(); }
public void save_chartdetails(decimal CP, decimal CPK, string max, string min, decimal Standardeviation) { try { //try //{ // cmd = new SqlCommand("delete from tbl_QChart",strConnString); //} //catch (Exception ex) //{ //} //finally //{ // strConnString.Open(); // cmd.ExecuteNonQuery(); // strConnString.Close(); //} ds = objserver.GetDateset("select * from tbl_QChart"); if (ds.Tables[0].Rows.Count > 0) { } else { ds1 = objserver.GetDateset("select * from QualitySheet"); for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { cmd = new SqlCommand("SP_nsertChart", strConnString); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add("@Chart_Max", SqlDbType.Decimal).Value = Convert.ToDecimal(max); cmd.Parameters.Add("@Chart_Min", SqlDbType.Decimal).Value = Convert.ToDecimal(min); cmd.Parameters.Add("@Chart_CP", SqlDbType.Decimal).Value = CP; cmd.Parameters.Add("@Chart_CPK", SqlDbType.Decimal).Value = CPK; cmd.Parameters.Add("@Chart_Deviation", SqlDbType.Decimal).Value = Standardeviation; cmd.Parameters.Add("@Average", SqlDbType.Decimal).Value = ds1.Tables[0].Rows[i]["Average"]; strConnString.Open(); cmd.ExecuteNonQuery(); strConnString.Close(); } } } catch (Exception ex) { } finally { } }
private void BindPartNO() { ds = new DataSet(); ds.Tables.Clear(); ds.Clear(); ds.Reset(); ds = objserver.GetDateset("select '-Select-' PartNo union select distinct PartNo from tbl_PartNo order by PartNo asc"); if (ds.Tables[0].Rows.Count > 0) { dy_del_partno.DataSource = ds.Tables[0]; dy_del_partno.DataValueField = "partNo"; dy_del_partno.DataTextField = "partNo"; dy_del_partno.DataBind(); } }
private void BindPart() { ds = objserver.GetDateset("select '-Select-' PartNo,'-Select-' PartNo union select distinct PartNo,PartNo from tbl_PartNo order by 1 asc"); ddl_prodn_no.DataValueField = "PartNo"; ddl_prodn_no.DataTextField = "PartNo"; ddl_prodn_no.DataSource = ds.Tables[0]; ddl_prodn_no.DataBind(); }
private void BindToolNumber() { ds = objserver.GetDateset("select '0' ID,'--- Select Tool Number ---' ToolNumber union select distinct b.ID,b.ToolNumber as ToolNumber from Abu_Master a inner join AbuToolMaster b on cast(a.ToolNumber as int)=b.ID"); txt_toolnumber.DataSource = ds.Tables[0]; txt_toolnumber.DataValueField = "ID"; txt_toolnumber.DataTextField = "ToolNumber"; txt_toolnumber.DataBind(); }
private void BindData() { ds = objserver.GetDateset("select distinct Partno from tbl_PartNo order by Partno"); GridView2.DataSource = ds.Tables[0]; GridView2.DataBind(); }
private void BindData() { lock (thisLock) { try { ds = objserver.GetDateset("select '-Select-' Partno,'-Select-' Partno union select distinct partno,Partno from tbl_PartNo order by 1 desc"); DropPart.DataValueField = "Partno"; DropPart.DataTextField = "Partno"; DropPart.DataSource = ds.Tables[0]; DropPart.DataBind(); } catch (Exception ex) { ExceptionLogging.SendExcepToDB(ex); } } }
private void BindToolNumber() { ds = objserver.GetDateset("select '0' ID,'--- Select Tool Number ---' ToolNumber union select distinct ID,ToolNumber from AbuToolMaster"); ddl_toolnumber.DataSource = ds.Tables[0]; ddl_toolnumber.DataValueField = "ID"; ddl_toolnumber.DataTextField = "ToolNumber"; ddl_toolnumber.DataBind(); }
private void BindData() { lock (thisLock) { try { ds = objserver.GetDateset("select distinct Partno,Description from tbl_PartNo"); GridView1.DataSource = ds.Tables[0]; GridView1.DataBind(); } catch (Exception ex) { ExceptionLogging.SendExcepToDB(ex); } finally { } } }
public void loadGrid() { ds = objserver.GetDateset("select * from tbl_barcode"); if (ds.Tables[0].Rows.Count > 0) { DL_barcodeTemplate.DataSource = ds; DL_barcodeTemplate.DataBind(); } else { } }
//private void ViewMachineReport1() //{ // DBServer db = new DBServer(); // //db.Machinename = txt_mchn.Value; // //db.fromdate = txtt_fromdate.Value; // //db.todate = txtt_todate.Value; // ds = db.ViewMachineReport(db); //// ReportDocument report = new ReportDocument(); // report.Load(Server.MapPath("DepartmentRPT.rpt")); // report.SetDataSource(ds.Tables[0]); // CrystalReportViewer1.ReportSource = report; // //DepartmentRPT objRpt = new DepartmentRPT(); // //objRpt.SetDataSource(ds.Tables[0]); // //CrystalReportViewer1.ReportSource = objRpt; // //CrystalReportViewer1.Refresh(); //} //private void BindPart() //{ // ds = objserver.GetDateset("select '-Select-' Partno,'-Select-' Partno union select distinct partno,Partno from tbl_PartNo order by 1 asc"); // ddl_partno.DataValueField = "Partno"; // ddl_partno.DataTextField = "Partno"; // ddl_partno.DataSource = ds.Tables[0]; // ddl_partno.DataBind(); //} private void BindProcess() { lock (thisLock) { try { ds = objserver.GetDateset("select '-Select-' Process,'-Select-' Process union select distinct Process,Process from tbl_Process order by 1 asc"); ddl_process.DataSource = ds.Tables[0]; ddl_process.DataValueField = "process"; ddl_process.DataTextField = "process"; ddl_process.DataBind(); } catch (Exception ex) { ExceptionLogging.SendExcepToDB(ex); } finally { } } }
protected void Menu1_MenuItemClick(object sender, MenuEventArgs e) { int index = Int32.Parse(e.Item.Value); MultiView1.ActiveViewIndex = index; if (index == 0) { DataSet ds = new DataSet(); ds = objserver.GetDateset("select * from tbl_Process"); if (ds.Tables[0].Rows.Count > 0) { Grid_proc.DataSource = ds.Tables[0]; Grid_proc.DataBind(); } } else if (index == 1) { DataSet ds = new DataSet(); ds = objserver.GetDateset("select * from tbl_PartNo"); if (ds.Tables[0].Rows.Count > 0) { Grid_of.DataSource = ds.Tables[0]; Grid_of.DataBind(); } } else if (index == 2) { DataSet ds = new DataSet(); ds = objserver.GetDateset("select * from Frequency"); if (ds.Tables[0].Rows.Count > 0) { grd_frequency.DataSource = ds.Tables[0]; grd_frequency.DataBind(); } } else if (index == 3) { DataSet ds = new DataSet(); ds = objserver.GetDateset("select * from cell"); if (ds.Tables[0].Rows.Count > 0) { grd_unit.DataSource = ds.Tables[0]; grd_unit.DataBind(); } } else if (index == 4) { DataSet ds = new DataSet(); ds = objserver.GetDateset("select * from Machine"); if (ds.Tables[0].Rows.Count > 0) { grd_mach.DataSource = ds.Tables[0]; grd_mach.DataBind(); } } }
protected void btn_view_Click(object sender, EventArgs e) { ds = objserver.GetDateset("select * from QSReportFile where PID_No='" + txt_pidno.Value.ToString() + "' and Shift='" + txt_shift.Value.ToString() + "'"); if (ds.Tables[0].Rows.Count > 0) { strPath = ds.Tables[0].Rows[0].ItemArray[5].ToString(); string filepath = strPath; string FullFilePath = strPath; FileInfo file = new FileInfo(FullFilePath); if (file.Exists) { Response.Clear(); Response.AddHeader("Content-Disposition", "inline; filename=" + file.Name); Response.AddHeader("Content-Length", file.Length.ToString()); Response.ContentType = "application/octet-stream"; Response.WriteFile(file.FullName); Response.End(); } } }
private void BindData() { lock (thisLock) { try { ds = objserver.GetDateset("ViewAllDMTTemplate"); GridView1.DataSource = ds.Tables[0]; GridView1.DataBind(); } catch (Exception ex) { ExceptionLogging.SendExcepToDB(ex); } } }