protected void img_view_Click(object sender, ImageClickEventArgs e) { string partno, operation, type, fromdate, todate, shift; partno = ddl_partno.Value.ToString(); operation = ddl_process.Value.ToString(); type = ddl_type.Value.ToString(); fromdate = txt_fromdate.Value.ToString(); todate = txt_todate.Value.ToString(); shift = ddl_shift.Value.ToString(); if (type == "1") { DBServer db = new DBServer(); DataSet ds = new DataSet(); ds = db.viewpageloadresultdmt(partno, operation, fromdate, todate); ReportDataSource rds = new ReportDataSource("DataSet1_DMT_Template", ds.Tables[0]); if (ds.Tables[0].Rows.Count > 0) { LocalReport lr = null; DataSet ds1 = new DataSet(); ReportViewer1.ProcessingMode = ProcessingMode.Local; lr = ReportViewer1.LocalReport; lr.ReportPath = "Reports/DmtReports.rdlc"; //lr.DataSources.Add(new ReportDataSource("ViewDMTTemplate", ds.Tables[0])); ReportViewer1.LocalReport.DataSources.Clear(); ReportViewer1.LocalReport.DataSources.Add(rds); ReportViewer1.LocalReport.Refresh(); } else { ScriptManager.RegisterStartupScript(this, this.GetType(), "alert", "alert('Record Not Found');", true); ReportViewer1.LocalReport.DataSources.Clear(); ReportViewer1.LocalReport.DataSources.Add(rds); ReportViewer1.LocalReport.Refresh(); } } if (type == "2") { Response.Redirect("EfficiencyReports.aspx?Type=" + type + "&Partno=" + partno + "&Operation=" + operation + "&fromdate=" + fromdate + "&todate=" + todate + "&Shift=" + shift); } if (type == "3") { Response.Redirect("~/QualityGrid/ViewQChart.aspx?Type=" + type + "&Partno=" + partno + "&Operation=" + operation + "&fromdate=" + fromdate + "&todate=" + todate + "&Shift=" + shift); } }
//protected void DropPartNo_SelectedIndexChanged(object sender, EventArgs e) //{ // ViewDMTDetailsbyPartNO(); //} //protected void DropPartNo_TextChanged(object sender, EventArgs e) //{ // ViewDMTDetailsbyPartNO(); //} //private void ViewDMTDetailsbyProcess() //{ // DBServer db = new DBServer(); // db.Process = DropProcess.Text; // db.PartNo = DropPartNo.Text; // ds = db.ViewAllDMTTemplateByProcess(db); // //ds = objserver.GetDateset("select doc_ref,Rev,businessunit,parttype,operation,specificpartorcommon,typeofdocument,creationdate,revisiondate,status,comments,functioninchargeoffilling ,paperfilling ,durationoffilling ,storageplacefilling ,electronicsfilling ,methodoffilling ,protectagainstwaterfilling ,funinchargeof ,paper ,electronics ,durationofarchiving ,archivingplace ,authorized ,notauthorized ,functioninchargeofdestruction ,methodOfDestruction from dbo.DMT_Template where specificpartorcommon=" + Convert.ToString(this.DropProcess.Text) + ""); // ReportDataSource rds = new ReportDataSource("DataSet1_DMT_Template", ds.Tables[0]); // if (ds.Tables[0].Rows.Count > 0) // { // LocalReport lr = null; // DataSet ds1 = new DataSet(); // ReportViewer1.ProcessingMode = ProcessingMode.Local; // lr = ReportViewer1.LocalReport; // lr.ReportPath = "Reports/DmtReports.rdlc"; // //lr.DataSources.Add(new ReportDataSource("ViewDMTTemplate", ds.Tables[0])); // ReportViewer1.LocalReport.DataSources.Clear(); // ReportViewer1.LocalReport.DataSources.Add(rds); // ReportViewer1.LocalReport.Refresh(); // } // else // { // ScriptManager.RegisterStartupScript(this, this.GetType(), "alert", "alert('Record Not Found');", true); // ReportViewer1.LocalReport.DataSources.Clear(); // ReportViewer1.LocalReport.DataSources.Add(rds); // ReportViewer1.LocalReport.Refresh(); // } //} //protected void DropProcess_SelectedIndexChanged(object sender, EventArgs e) //{ // ViewDMTDetailsbyProcess(); //} //protected void Button1_Click(object sender, EventArgs e) //{ // ViewDMTDetailsbyProcess(); //} //protected void DropPartNo_Unload(object sender, EventArgs e) //{ //} //protected void Button2_Click(object sender, EventArgs e) //{ // ViewDMTDetailsbyPartNO(); //} //protected void Button3_Click(object sender, EventArgs e) //{ // ViewAllDMTDetails(); //} public void showPageloadResult(string partno, string process, string from, string to) { lock (thisLock) { try { DBServer db = new DBServer(); DataSet ds = new DataSet(); ds = db.viewpageloadresultdmt(partno, process, from, to); ReportDataSource rds = new ReportDataSource("DataSet1_DMT_Template", ds.Tables[0]); if (ds.Tables[0].Rows.Count > 0) { LocalReport lr = null; DataSet ds1 = new DataSet(); ReportViewer1.ProcessingMode = ProcessingMode.Local; lr = ReportViewer1.LocalReport; lr.ReportPath = "Reports/DmtReports.rdlc"; //lr.DataSources.Add(new ReportDataSource("ViewDMTTemplate", ds.Tables[0])); ReportViewer1.LocalReport.DataSources.Clear(); ReportViewer1.LocalReport.DataSources.Add(rds); ReportViewer1.LocalReport.Refresh(); } else { ScriptManager.RegisterStartupScript(this, this.GetType(), "alert", "alert('Record Not Found');", true); ReportViewer1.LocalReport.DataSources.Clear(); ReportViewer1.LocalReport.DataSources.Add(rds); ReportViewer1.LocalReport.Refresh(); } } catch (Exception ex) { ExceptionLogging.SendExcepToDB(ex); } } }