protected void fillAppointmentSummary() { ds = new DataSet(); objreport = new Base_BLL_Report_Collection(); string fromdate = (drp_YearFrom.SelectedValue + "-" + Convert.ToInt32(ddlfromMonth.SelectedValue) + "-1").ToString(); string todate = (drp_YearTo.SelectedValue + "-" + Convert.ToInt32(ddltomonth.SelectedValue) + "-1").ToString(); int flag; if (ddlfromMonth.SelectedValue == ddltomonth.SelectedValue) { flag = 1; } else { flag = 2; } ds = objreport.GetMonthlyCollectionReport(fromdate, todate, flag); if (ds != null) { UC_Total_Display.TotalPatient = ds.Tables[0].Rows.Count.ToString(); UC_Total_Display.TotalAmmount = ds.Tables[0].Compute("Sum(Fees)", "").ToString(); UC_ListGrid1.Data = ds; } }
protected void FillPieChart() { objreport = new Base_BLL_Report_Collection(); string s1 = ""; string s2 = ""; string s3 = ""; string s4 = ""; string s5 = ""; string s6 = ""; string s7 = ""; string s8 = ""; string s9 = ""; string s10 = ""; string s11 = ""; string s12 = ""; string s13 = ""; string s14 = ""; string s15 = ""; DateTimeFormatInfo dtfi; dtfi = new DateTimeFormatInfo(); dtfi.ShortDatePattern = "dd-MM-yyyy"; dtfi.DateSeparator = "-"; DateTime objDate = Convert.ToDateTime(txt_appointmentDate.Text, dtfi); int flag = Convert.ToInt32(Request.QueryString["flag"]); if (Convert.ToDateTime(txt_appointmentDate.Text).Date == System.DateTime.Today.Date) { flag = 1; } DataSet Ds = objreport.CollectionReport_Daily_PieChart(objDate.ToString(), flag); if (Ds.Tables[0].Rows.Count > 0) { s1 = "<script type='text/javascript'>$(function (){ $('#Div_PieChart').highcharts({"; s2 = "chart: { plotBackgroundColor: null, plotBorderWidth: null, plotShadow: false},"; s3 = "title: {text: 'Todays Appointment'},"; s4 = "tooltip: {formatter: function() {var s; if (this.point.name) { s = ''+this.point.name +': '+ this.y +'';} else {s = ''+this.x +': '+ this.y;}return s;}},"; s5 = "plotOptions: {pie: { allowPointSelect: true, cursor: 'pointer', dataLabels: {enabled: true,color: '#000000',connectorColor: '#000000', formatter: function() {return '<b>'+ this.point.name +'</b>: '+ this.percentage.toFixed(2) +' %';}}}},"; s6 = "series: [{"; s7 = "type: 'pie',"; s8 = "name: 'Browser share',"; s9 = "data: ["; s11 = "['New'," + Ds.Tables[0].Rows[0][1] + "],"; s12 = "['OLD'," + Ds.Tables[0].Rows[0][3] + "],"; s13 = "['Free'," + Ds.Tables[0].Rows[0][0] + "]"; s10 = "]}]});});</script>"; s14 = s1 + s2 + s3 + s4 + s5 + s6 + s7 + s8 + s9 + s11 + s12 + s13 + s10; ClientScript.RegisterStartupScript(Page.GetType(), "sas", s14); FillBarchart(Ds.Tables[0].Rows[0][2].ToString(), Ds.Tables[0].Rows[0][4].ToString()); } }
protected void fillAppointmentSummary() { ds = new DataSet(); objreport = new Base_BLL_Report_Collection(); string year = ddlyear.SelectedValue.ToString() + "-1-1"; ds = objreport.GetYearlyCollectionReport(year); if (ds != null) { UC_Total_Display.TotalPatient = ds.Tables[0].Rows.Count.ToString(); UC_Total_Display.TotalAmmount = ds.Tables[0].Compute("Sum(Fees)", "").ToString(); UC_ListGrid_New.Data = ds; } }
protected void Button1_Click(object sender, EventArgs e) { ds = new DataSet(); objreport = new Base_BLL_Report_Collection(); string year = ddlyear.SelectedValue.ToString() + "-1-1"; ds = objreport.GetYearlyCollectionReport(year); DataTable table = new DataTable(); table = ds.Tables[0]; if (table == null || table.Rows.Count == 0) { //clsJava.MessageBox("There is no records to export"); return; } int[] columnList = { table.Columns["FullName"].Ordinal, table.Columns["LocalOutside"].Ordinal, table.Columns["NewOld"].Ordinal, table.Columns["TockenID"].Ordinal, table.Columns["Fees"].Ordinal, table.Columns["AppoinmentDateTime"].Ordinal, table.Columns["InTime"].Ordinal, table.Columns["Fees"].Ordinal, }; string[] HeadingList = { "FullName", "Local/Outside", "New/Old", "TockenId", "Fees", "AppoinmenmentDate", "InTime", "Fees", }; RKLib.ExportData.Export objExport = new RKLib.ExportData.Export("Web"); objExport.ExportDetails(table, columnList, HeadingList, RKLib.ExportData.Export.ExportFormat.Excel, "PatientsReport.xls"); }
protected void btn_print_Click(object sender, EventArgs e) { clsPrinting objPrint = new clsPrinting(); ds = new DataSet(); ds = new DataSet(); objreport = new Base_BLL_Report_Collection(); string year = ddlyear.SelectedValue.ToString() + "-1-1"; ds = objreport.GetYearlyCollectionReport(year); DataTable table = new DataTable(); table = ds.Tables[0]; // Assign Data Source objPrint.DataSource = table; //Heading Here objPrint.ReportHeading = GetReortHeading(); objPrint.ReportHeading.SubHeading = "Report for Year :" + ddlyear.SelectedValue.ToString(); objPrint.ShowFooter = true; // Create Columns Here objPrint.Columns.Add(new clsGridColumn("FullName", "FullName", "9%")); objPrint.Columns.Add(new clsGridColumn("LocalOutside.", "LocalOutside", "10%")); objPrint.Columns.Add(new clsGridColumn("NewOld", "NewOld", "15%")); objPrint.Columns.Add(new clsGridColumn("TockenID", "TockenID", "9%")); objPrint.Columns.Add(new clsGridColumn("AppoinmentDateTime", "AppoinmentDateTime", "8%")); objPrint.Columns.Add(new clsGridColumn("InTime", "InTime", "14%", "Total:")); objPrint.Columns.Add(new clsGridColumn("Fees", "Fees", "6%", true)); //objPrint.Columns.Add(new clsGridColumn("Mobile", "MobileAll", "15%")); //objPrint.Columns.Add(new clsGridColumn("Email", "EmailAll", "14%")); hdPrint.Value = objPrint.GetGrid(); ScriptManager.RegisterStartupScript(this, this.GetType(), "Close", "GetPrint();", true); }