public void BindAllDate() { #region FromDate ToDate CustomerCode And Status if (txtFrom.Text != string.Empty && txtTo.Text != string.Empty && txtCutomerName.Text != string.Empty && InqSatatus.SelectedItem.Text != "Select") { Other_Z.OtherBAL ObjDal = new Other_Z.OtherBAL(); HelpDeskReports IDS = new HelpDeskReports(); DataSet DS = new DataSet(); string FromDate = DateTime.Now.ToString("MM/dd/yyyy"); string TODate = DateTime.Now.ToString("MM/dd/yyyy"); FromDate = txtFrom.Text.Split('/')[1] + "/" + txtFrom.Text.Split('/')[0] + "/" + txtFrom.Text.Split('/')[2]; TODate = txtTo.Text.Split('/')[1] + "/" + txtTo.Text.Split('/')[0] + "/" + txtTo.Text.Split('/')[2]; DS = ObjDal.AllRecordRepordTicketHistory(Convert.ToDateTime(FromDate), Convert.ToDateTime(TODate), "0", "0", txtCutomerName.Text.Split(':')[0].ToString(), "0", "0", InqSatatus.SelectedValue, "FD&TD&Status&CustCode"); if (DS.Tables[0].Rows.Count > 0) { crystalreportviewercheque.Visible = true; DataView dv = new DataView(DS.Tables[0]); ReportDocument rd = new ReportDocument(); rd.Load(Server.MapPath("Report/CallReport.rpt")); rd.Database.Tables[0].SetDataSource(dv); crystalreportviewercheque.ReportSource = rd; } else { ScriptManager.RegisterStartupScript(this, this.GetType(), "alert", "alert('Record are not Found !')", true); crystalreportviewercheque.Visible = false; txtFrom.Focus(); } } #endregion #region FromDate ToDate CustomerCode else if (txtFrom.Text != string.Empty && txtTo.Text != string.Empty && txtCutomerName.Text != string.Empty) { Other_Z.OtherBAL ObjDal = new Other_Z.OtherBAL(); HelpDeskReports IDS = new HelpDeskReports(); DataSet DS = new DataSet(); string FromDate = DateTime.Now.ToString("MM/dd/yyyy"); string TODate = DateTime.Now.ToString("MM/dd/yyyy"); FromDate = txtFrom.Text.Split('/')[1] + "/" + txtFrom.Text.Split('/')[0] + "/" + txtFrom.Text.Split('/')[2]; TODate = txtTo.Text.Split('/')[1] + "/" + txtTo.Text.Split('/')[0] + "/" + txtTo.Text.Split('/')[2]; DS = ObjDal.AllRecordRepordTicketHistory(Convert.ToDateTime(FromDate), Convert.ToDateTime(TODate), "0", "0", txtCutomerName.Text.Split(':')[0].ToString(), "0", "0", "0", "FD&TD&CustCode"); if (DS.Tables[0].Rows.Count > 0) { crystalreportviewercheque.Visible = true; DataView dv = new DataView(DS.Tables[0]); ReportDocument rd = new ReportDocument(); rd.Load(Server.MapPath("Report/CallReport.rpt")); rd.Database.Tables[0].SetDataSource(dv); crystalreportviewercheque.ReportSource = rd; } else { ScriptManager.RegisterStartupScript(this, this.GetType(), "alert", "alert('Record are not Found !')", true); crystalreportviewercheque.Visible = false; txtFrom.Focus(); } } #endregion #region FromDate ToDate And Status else if (txtFrom.Text != string.Empty && txtTo.Text != string.Empty && InqSatatus.SelectedItem.Text != "Select") { Other_Z.OtherBAL ObjDal = new Other_Z.OtherBAL(); HelpDeskReports IDS = new HelpDeskReports(); DataSet DS = new DataSet(); string FromDate = DateTime.Now.ToString("MM/dd/yyyy"); string TODate = DateTime.Now.ToString("MM/dd/yyyy"); FromDate = txtFrom.Text.Split('/')[1] + "/" + txtFrom.Text.Split('/')[0] + "/" + txtFrom.Text.Split('/')[2]; TODate = txtTo.Text.Split('/')[1] + "/" + txtTo.Text.Split('/')[0] + "/" + txtTo.Text.Split('/')[2]; DS = ObjDal.AllRecordRepordTicketHistory(Convert.ToDateTime(FromDate), Convert.ToDateTime(TODate), "0", "0", "0", "0", "0", InqSatatus.SelectedValue, "FD&TD&Status"); if (DS.Tables[0].Rows.Count > 0) { crystalreportviewercheque.Visible = true; DataView dv = new DataView(DS.Tables[0]); ReportDocument rd = new ReportDocument(); rd.Load(Server.MapPath("Report/CallReport.rpt")); rd.Database.Tables[0].SetDataSource(dv); crystalreportviewercheque.ReportSource = rd; } else { ScriptManager.RegisterStartupScript(this, this.GetType(), "alert", "alert('Record are not Found !')", true); crystalreportviewercheque.Visible = false; txtFrom.Focus(); } } #endregion #region From Date To Date Method else if (txtFrom.Text != string.Empty && txtTo.Text != string.Empty) { Other_Z.OtherBAL ObjDal = new Other_Z.OtherBAL(); HelpDeskReports IDS = new HelpDeskReports(); DataSet DS = new DataSet(); string FromDate = DateTime.Now.ToString("MM/dd/yyyy"); string TODate = DateTime.Now.ToString("MM/dd/yyyy"); FromDate = txtFrom.Text.Split('/')[1] + "/" + txtFrom.Text.Split('/')[0] + "/" + txtFrom.Text.Split('/')[2]; TODate = txtTo.Text.Split('/')[1] + "/" + txtTo.Text.Split('/')[0] + "/" + txtTo.Text.Split('/')[2]; InqBal.Action = "FD&TD"; DS = ObjDal.AllRecordRepordTicketHistory(Convert.ToDateTime(FromDate), Convert.ToDateTime(TODate), "0", "0", "0", "0", "0", "0", "FD&TD"); if (DS.Tables[0].Rows.Count > 0) { crystalreportviewercheque.Visible = true; DataView dv = new DataView(DS.Tables[0]); ReportDocument rd = new ReportDocument(); rd.Load(Server.MapPath("Report/CallReport.rpt")); rd.Database.Tables[0].SetDataSource(dv); crystalreportviewercheque.ReportSource = rd; } else { ScriptManager.RegisterStartupScript(this, this.GetType(), "alert", "alert('Record are not Found !')", true); crystalreportviewercheque.Visible = false; txtFrom.Focus(); } } #endregion }
public void BindAllDate() { #region FromDate And ToDate And Customer And Status And Executive if (txtFrom.Text != string.Empty && txtTo.Text != string.Empty && txtCutomerName.Text != string.Empty && InqSatatus.SelectedItem.Text != "Select" && txtExeutiveName.Text != string.Empty) { HelpDeskReports IDS = new HelpDeskReports(); Other_Z.OtherBAL ObjDal = new Other_Z.OtherBAL(); DataSet DS = new DataSet(); string FromDate = DateTime.Now.ToString("MM/dd/yyyy"); string TODate = DateTime.Now.ToString("MM/dd/yyyy"); FromDate = txtFrom.Text.Split('/')[1] + "/" + txtFrom.Text.Split('/')[0] + "/" + txtFrom.Text.Split('/')[2]; TODate = txtTo.Text.Split('/')[1] + "/" + txtTo.Text.Split('/')[0] + "/" + txtTo.Text.Split('/')[2]; DS = ObjDal.AllRecordRepordTicketHistory(Convert.ToDateTime(FromDate), Convert.ToDateTime(TODate), "0", "0", txtCutomerName.Text.Split(':')[0].ToString(), txtExeutiveName.Text, "0", InqSatatus.SelectedValue, "FD&TD&Status&CustCode&EmpCode"); if (DS.Tables[0].Rows.Count > 0) { CustomerWiseAmount.Visible = true; DataView dv = new DataView(DS.Tables[0]); ReportDocument rd = new ReportDocument(); rd.Load(Server.MapPath("Report/CallReportExecutive.rpt")); rd.Database.Tables[0].SetDataSource(dv); CustomerWiseAmount.ReportSource = rd; CustomerWiseAmount.RefreshReport(); CustomerWiseAmount.DataBind(); } else { ScriptManager.RegisterStartupScript(this, this.GetType(), "alert", "alert('Record not Found !')", true); CustomerWiseAmount.Visible = false; txtFrom.Focus(); } } #endregion #region FromDate And ToDate And Customer And Status else if (txtFrom.Text != string.Empty && txtTo.Text != string.Empty && txtCutomerName.Text != string.Empty && InqSatatus.SelectedItem.Text != "Select") { Other_Z.OtherBAL ObjDal = new Other_Z.OtherBAL(); HelpDeskReports IDS = new HelpDeskReports(); DataSet DS = new DataSet(); string FromDate = DateTime.Now.ToString("MM/dd/yyyy"); string TODate = DateTime.Now.ToString("MM/dd/yyyy"); FromDate = txtFrom.Text.Split('/')[1] + "/" + txtFrom.Text.Split('/')[0] + "/" + txtFrom.Text.Split('/')[2]; TODate = txtTo.Text.Split('/')[1] + "/" + txtTo.Text.Split('/')[0] + "/" + txtTo.Text.Split('/')[2]; DS = ObjDal.AllRecordRepordTicketHistory(Convert.ToDateTime(FromDate), Convert.ToDateTime(TODate), "0", "0", txtCutomerName.Text.Split(':')[0].ToString(), "0", "0", InqSatatus.SelectedValue, "FD&TD&Status&CustCode"); if (DS.Tables[0].Rows.Count > 0) { CustomerWiseAmount.Visible = true; DataView dv = new DataView(DS.Tables[0]); ReportDocument rd = new ReportDocument(); rd.Load(Server.MapPath("Report/CallReportExecutive.rpt")); rd.Database.Tables[0].SetDataSource(dv); CustomerWiseAmount.ReportSource = rd; CustomerWiseAmount.RefreshReport(); CustomerWiseAmount.DataBind(); } else { ScriptManager.RegisterStartupScript(this, this.GetType(), "alert", "alert('Record are not Found !')", true); CustomerWiseAmount.Visible = false; txtFrom.Focus(); } } #endregion #region FromDate And ToDate And Status else if (txtFrom.Text != string.Empty && txtTo.Text != string.Empty && InqSatatus.SelectedItem.Text != "Select") { //if (txtFrom.Text != string.Empty && txtTo.Text != string.Empty && InqSatatus.SelectedItem.Text != "Select") //{ Other_Z.OtherBAL ObjDal = new Other_Z.OtherBAL(); HelpDeskReports IDS = new HelpDeskReports(); DataSet DS = new DataSet(); string FromDate = DateTime.Now.ToString("MM/dd/yyyy"); string TODate = DateTime.Now.ToString("MM/dd/yyyy"); FromDate = txtFrom.Text.Split('/')[1] + "/" + txtFrom.Text.Split('/')[0] + "/" + txtFrom.Text.Split('/')[2]; TODate = txtTo.Text.Split('/')[1] + "/" + txtTo.Text.Split('/')[0] + "/" + txtTo.Text.Split('/')[2]; //InqBal.Fromdate = Convert.ToDateTime(txtFrom.Text.Split('/')[2] + "/" + txtFrom.Text.Split('/')[1] + "/" + txtFrom.Text.Split('/')[0]); //InqBal.ToDate = Convert.ToDateTime(txtTo.Text.Split('/')[2] + "/" + txtTo.Text.Split('/')[1] + "/" + txtTo.Text.Split('/')[0]); //InqBal.Status = InqSatatus.SelectedValue; //InqBal.Action = "FD&TD&Status"; DS = ObjDal.AllRecordRepordTicketHistory(Convert.ToDateTime(FromDate), Convert.ToDateTime(TODate), "0", "0", "0", "0", "0", InqSatatus.SelectedValue, "FD&TD&Status"); if (DS.Tables[0].Rows.Count > 0) { CustomerWiseAmount.Visible = true; DataView dv = new DataView(DS.Tables[0]); ReportDocument rd = new ReportDocument(); rd.Load(Server.MapPath("Report/CallReportExecutive.rpt")); rd.Database.Tables[0].SetDataSource(dv); CustomerWiseAmount.ReportSource = rd; CustomerWiseAmount.RefreshReport(); CustomerWiseAmount.DataBind(); } else { ScriptManager.RegisterStartupScript(this, this.GetType(), "alert", "alert('Record are not Found !')", true); CustomerWiseAmount.Visible = false; txtFrom.Focus(); } // } //else //{ // ScriptManager.RegisterStartupScript(this, this.GetType(), "alert", "alert('Please Enter Between Date.. !')", true); // txtFrom.Focus(); // txtFrom.Text = ""; //} } #endregion #region FromDate And ToDate And Customer else if (txtFrom.Text != string.Empty && txtTo.Text != string.Empty && txtCutomerName.Text != string.Empty) { Other_Z.OtherBAL ObjDal = new Other_Z.OtherBAL(); HelpDeskReports IDS = new HelpDeskReports(); DataSet DS = new DataSet(); string FromDate = DateTime.Now.ToString("MM/dd/yyyy"); string TODate = DateTime.Now.ToString("MM/dd/yyyy"); FromDate = txtFrom.Text.Split('/')[1] + "/" + txtFrom.Text.Split('/')[0] + "/" + txtFrom.Text.Split('/')[2]; TODate = txtTo.Text.Split('/')[1] + "/" + txtTo.Text.Split('/')[0] + "/" + txtTo.Text.Split('/')[2]; DS = ObjDal.AllRecordRepordTicketHistory(Convert.ToDateTime(FromDate), Convert.ToDateTime(TODate), "0", "0", txtCutomerName.Text.Split(':')[0].ToString(), "0", "0", "0", "FD&TD&CustCode"); if (DS.Tables[0].Rows.Count > 0) { CustomerWiseAmount.Visible = true; DataView dv = new DataView(DS.Tables[0]); ReportDocument rd = new ReportDocument(); rd.Load(Server.MapPath("Report/CallReportExecutive.rpt")); rd.Database.Tables[0].SetDataSource(dv); CustomerWiseAmount.ReportSource = rd; } else { ScriptManager.RegisterStartupScript(this, this.GetType(), "alert", "alert('Record are not Found !')", true); CustomerWiseAmount.Visible = false; txtFrom.Focus(); } } #endregion #region FromDate And ToDate And Exeutive else if (txtFrom.Text != string.Empty && txtTo.Text != string.Empty && txtExeutiveName.Text != string.Empty) { Other_Z.OtherBAL ObjDal = new Other_Z.OtherBAL(); HelpDeskReports IDS = new HelpDeskReports(); DataSet DS = new DataSet(); string FromDate = DateTime.Now.ToString("MM/dd/yyyy"); string TODate = DateTime.Now.ToString("MM/dd/yyyy"); FromDate = txtFrom.Text.Split('/')[1] + "/" + txtFrom.Text.Split('/')[0] + "/" + txtFrom.Text.Split('/')[2]; TODate = txtTo.Text.Split('/')[1] + "/" + txtTo.Text.Split('/')[0] + "/" + txtTo.Text.Split('/')[2]; DS = ObjDal.AllRecordRepordTicketHistory(Convert.ToDateTime(FromDate), Convert.ToDateTime(TODate), "0", "0", "0", txtExeutiveName.Text, "0", "0", "FD&TD&Emp"); if (DS.Tables[0].Rows.Count > 0) { CustomerWiseAmount.Visible = true; DataView dv = new DataView(DS.Tables[0]); ReportDocument rd = new ReportDocument(); rd.Load(Server.MapPath("Report/CallReportExecutive.rpt")); rd.Database.Tables[0].SetDataSource(dv); CustomerWiseAmount.ReportSource = rd; } else { ScriptManager.RegisterStartupScript(this, this.GetType(), "alert", "alert('Record are not Found !')", true); CustomerWiseAmount.Visible = false; txtFrom.Focus(); } } #endregion #region FromDate And ToDate And Exeutive And Customer else if (txtFrom.Text != string.Empty && txtTo.Text != string.Empty && txtCutomerName.Text != string.Empty && txtExeutiveName.Text != string.Empty) { Other_Z.OtherBAL ObjDal = new Other_Z.OtherBAL(); HelpDeskReports IDS = new HelpDeskReports(); DataSet DS = new DataSet(); string FromDate = DateTime.Now.ToString("MM/dd/yyyy"); string TODate = DateTime.Now.ToString("MM/dd/yyyy"); FromDate = txtFrom.Text.Split('/')[1] + "/" + txtFrom.Text.Split('/')[0] + "/" + txtFrom.Text.Split('/')[2]; TODate = txtTo.Text.Split('/')[1] + "/" + txtTo.Text.Split('/')[0] + "/" + txtTo.Text.Split('/')[2]; DS = ObjDal.AllRecordRepordTicketHistory(Convert.ToDateTime(FromDate), Convert.ToDateTime(TODate), "0", "0", txtCutomerName.Text.Split(':')[0].ToString(), txtExeutiveName.Text, "0", "0", "FD&TD&Emp"); if (DS.Tables[0].Rows.Count > 0) { CustomerWiseAmount.Visible = true; DataView dv = new DataView(DS.Tables[0]); ReportDocument rd = new ReportDocument(); rd.Load(Server.MapPath("Report/CallReportExecutive.rpt")); rd.Database.Tables[0].SetDataSource(dv); CustomerWiseAmount.ReportSource = rd; } else { ScriptManager.RegisterStartupScript(this, this.GetType(), "alert", "alert('Record are not Found !')", true); CustomerWiseAmount.Visible = false; txtFrom.Focus(); } } #endregion #region From Date And To Date else if (txtFrom.Text != string.Empty && txtTo.Text != string.Empty) { Other_Z.OtherBAL ObjDal = new Other_Z.OtherBAL(); HelpDeskReports IDS = new HelpDeskReports(); DataSet DS = new DataSet(); string FromDate = DateTime.Now.ToString("MM/dd/yyyy"); string TODate = DateTime.Now.ToString("MM/dd/yyyy"); FromDate = txtFrom.Text.Split('/')[1] + "/" + txtFrom.Text.Split('/')[0] + "/" + txtFrom.Text.Split('/')[2]; TODate = txtTo.Text.Split('/')[1] + "/" + txtTo.Text.Split('/')[0] + "/" + txtTo.Text.Split('/')[2]; DS = ObjDal.AllRecordRepordTicketHistory(Convert.ToDateTime(FromDate), Convert.ToDateTime(TODate), "0", "0", "0", "0", "0", "0", "FD&TD"); if (DS.Tables[0].Rows.Count > 0) { CustomerWiseAmount.Visible = true; DataView dv = new DataView(DS.Tables[0]); ReportDocument rd = new ReportDocument(); rd.Load(Server.MapPath("Report/CallReportExecutive.rpt")); rd.Database.Tables[0].SetDataSource(dv); CustomerWiseAmount.ReportSource = rd; } else { ScriptManager.RegisterStartupScript(this, this.GetType(), "alert", "alert('Record are not Found !')", true); CustomerWiseAmount.Visible = false; txtFrom.Focus(); } } #endregion else { ScriptManager.RegisterStartupScript(this, this.GetType(), "alert", "alert('Record are not Found !')", true); CustomerWiseAmount.Visible = false; txtFrom.Focus(); } }