public override global::System.Data.DataSet Clone()
        {
            ScheduleReport cln = ((ScheduleReport)(base.Clone()));

            cln.InitVars();
            cln.SchemaSerializationMode = this.SchemaSerializationMode;
            return(cln);
        }
示例#2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        var report = new ScheduleReport();

        report.SchedulerAdapter = PrintAdapter.SchedulerAdapter;
        report.SchedulerAdapter.TimeInterval = new TimeInterval(StartDate, EndDate);
        ScheduleReportViewer.Report          = report;
    }
示例#3
0
 public SchedulePrinter(Schedule schedule, string path)
 {
     if (schedule == null)
     {
         throw new ArgumentNullException("schedule");
     }
     _report = BuildReport(schedule);
     _path   = path;
 }
        public ActionResult SchedulePrintPreviewPartial(string SchoolYearId)
        {
            var            model  = unitOfWork.ScheduleRepo.Get(m => m.SchoolYearId == SchoolYearId);
            ScheduleReport report = new ScheduleReport()
            {
                DataSource = model
            };

            return(PartialView("_SchedulePrintPreviewPartial", report));
        }
示例#5
0
 public ScheduleItem(
     ScheduleReport report, Outlook.AppointmentItem appointment)
 {
     this.report             = report;
     this.subject            = appointment.Subject;
     this.start              = appointment.Start;
     this.end                = appointment.End;
     this.relevantCategories = GetAppointmentCategories(appointment);
     this.relevantCategories.IntersectWith(
         report.ReportingCategories);
     this.duration = appointment.Duration / 60.0;
 }
        public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedDataSetSchema(global::System.Xml.Schema.XmlSchemaSet xs)
        {
            ScheduleReport ds = new ScheduleReport();

            global::System.Xml.Schema.XmlSchemaComplexType type     = new global::System.Xml.Schema.XmlSchemaComplexType();
            global::System.Xml.Schema.XmlSchemaSequence    sequence = new global::System.Xml.Schema.XmlSchemaSequence();
            global::System.Xml.Schema.XmlSchemaAny         any      = new global::System.Xml.Schema.XmlSchemaAny();
            any.Namespace = ds.Namespace;
            sequence.Items.Add(any);
            type.Particle = sequence;
            global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
            if (xs.Contains(dsSchema.TargetNamespace))
            {
                global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
                global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
                try {
                    global::System.Xml.Schema.XmlSchema schema = null;
                    dsSchema.Write(s1);
                    for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext();)
                    {
                        schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));
                        s2.SetLength(0);
                        schema.Write(s2);
                        if ((s1.Length == s2.Length))
                        {
                            s1.Position = 0;
                            s2.Position = 0;
                            for (; ((s1.Position != s1.Length) &&
                                    (s1.ReadByte() == s2.ReadByte()));)
                            {
                                ;
                            }
                            if ((s1.Position == s1.Length))
                            {
                                return(type);
                            }
                        }
                    }
                }
                finally {
                    if ((s1 != null))
                    {
                        s1.Close();
                    }
                    if ((s2 != null))
                    {
                        s2.Close();
                    }
                }
            }
            xs.Add(dsSchema);
            return(type);
        }
示例#7
0
        /// <summary>Generates a time tracking report and saves it in CSV
        /// format.</summary>
        /// <param name="reportStart">The begining date and time for the
        /// report.</param>
        /// <param name="reportEnd">The ending date and time for the report.
        /// </param>
        /// <param name="categories">The Outlook categories for which to
        /// collect data.</param>
        /// <param name="includeDailySubtotals">Indicates whether to include
        /// daily subtotals in the generated report.</param>
        /// <param name="filepath">The file to which to save the report.
        /// </param>
        internal static void GenerateReport(
            DateTime reportStart, DateTime reportEnd,
            HashSet <string> categories, bool includeDailySubtotals,
            string filepath)
        {
            ScheduleReport report = new ScheduleReport(
                reportStart, reportEnd, categories, includeDailySubtotals);

            Outlook.Items calendarItems =
                GetCalendarItemsInTimeFrame(reportStart, reportEnd);
            foreach (Outlook.AppointmentItem appointment in calendarItems)
            {
                report.Add(new ScheduleItem(report, appointment));
            }

            report.CreateCsvFile(filepath);
        }
示例#8
0
        private ScheduleReport BuildReport(Schedule schedule)
        {
            string name = schedule.Customer.Name;

            var    contracts = schedule.ScheduleDetails.Distinct(new CompareDetailsByContract());
            string locatoion = contracts.Aggregate("", (current, scheduleDetail) => current + (scheduleDetail.Contract.Property.Description + " / "));
            var    sdReport  =
                schedule.ScheduleDetails.Select(
                    scheduleDetail =>
                    new ScheduleDetailReport(scheduleDetail.AmountDue, scheduleDetail.DateDue,
                                             scheduleDetail.AmountPaid, scheduleDetail.Balance, false)).OrderBy(detail => detail.DateDue).ToList();
            //Add sum row
            var dueSum     = schedule.ScheduleDetails.Sum(x => x.AmountDue);
            var paidSum    = schedule.ScheduleDetails.Sum(x => x.AmountPaid);
            var balanceSum = schedule.ScheduleDetails.Sum(x => x.Balance);

            sdReport.Add(new ScheduleDetailReport(dueSum, SUM, paidSum, balanceSum, true));

            return(_report = new ScheduleReport(name, locatoion, sdReport));
        }
    public void BindGrid()
    {
        string id = string.Format("Id: {0} Uri: {1}", Guid.NewGuid(), HttpContext.Current.Request.Url);

        using (Utils utility = new Utils())
        {
            utility.MethodStart(id, System.Reflection.MethodBase.GetCurrentMethod());
        }
        try
        {
            DataSet   ds    = new DataSet();
            ArrayList objAL = new ArrayList();
            if (Page.IsPostBack)
            {
                objAL.Add(txtFromDate.Text);
                objAL.Add(txtToDate.Text);
            }
            else
            {
                objAL.Add("01/01/1900");
                objAL.Add(DateTime.Today.AddDays(-1).ToString("MM/dd/yyyy"));
            }
            objAL.Add(extddlDoctor.Text);
            objAL.Add(ddlStatus.SelectedValue.ToString());
            objAL.Add(txtCompanyID.Text);
            objAL.Add(extddlSpeciality.Text);

            string szCaseList     = "";
            string szProcDescList = "";

            if (txtCaseNo.Text.Length != 0)
            {
                szCaseList = getCaseList();
            }

            if ((!lstProcedureDesc.SelectedValue.ToString().Equals("")) && (!ddlProcedureCode.SelectedValue.ToString().Equals("NA")))
            {
                szProcDescList = getProcDescList();
            }

            //_reportBO = new Bill_Sys_ReportBO();
            //grdPayment.DataSource = _reportBO.Get_Referral_Schedule_Report(objAL);
            //grdPayment.DataBind();

            //Connection.ConnectionString str = new Connection.ConnectionString();
            String szConnection              = System.Configuration.ConfigurationManager.AppSettings["Connection_String"];
            XMLDMLComponent.SQLToDAO objDao  = new XMLDMLComponent.SQLToDAO(szConnection);
            mbs.dao.ScheduleReport   sReport = new ScheduleReport();
            sReport.from_date              = txtFromDate.Text;
            sReport.to_date                = txtToDate.Text;
            sReport.sz_company_id          = txtCompanyID.Text;
            sReport.sz_case_no             = szCaseList;
            sReport.sz_Patient_Name        = txtPatientName.Text;
            sReport.i_status               = ddlStatus.Text;
            sReport.sz_doctor_id           = extddlDoctor.Text;
            sReport.SZ_PROCEDURE_GROUP_ID  = extddlSpeciality.Text;
            sReport.SZ_PROCEDURE_CODE      = ddlProcedureCode.Text;
            sReport.SZ_PROCEDURE_CODE_DESC = szProcDescList;
            sReport.sz_Provider_id         = extddlOffice.Text;
            if (chkRfferal.Checked)
            {
                sReport.IsRefferalDoc = "1";
            }
            else
            {
                sReport.IsRefferalDoc = "NA";
            }



            ds = objDao.LoadDataSet("SP_REFFERAL_SCHEDULE_REPORT", "mbs.dao.ScheduleReport", sReport, "mbs.dao");

            DataView dv1;
            dv1 = ds.Tables[0].DefaultView;

            Session["grdPayment"] = ds;

            grdPayment.DataSource = dv1;
            grdPayment.DataBind();
        }
        catch (Exception ex)
        {
            Elmah.ErrorSignal.FromCurrentContext().Raise(ex);
            using (Utils utility = new Utils())
            {
                utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
            }
            string str2 = "Error Request=" + id + ".Please share with Technical support.";
            base.Response.Redirect("../Bill_Sys_ErrorPage.aspx?ErrMsg=" + str2);
        }

        //Method End
        using (Utils utility = new Utils())
        {
            utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
        }
    }
            public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs)
            {
                global::System.Xml.Schema.XmlSchemaComplexType type     = new global::System.Xml.Schema.XmlSchemaComplexType();
                global::System.Xml.Schema.XmlSchemaSequence    sequence = new global::System.Xml.Schema.XmlSchemaSequence();
                ScheduleReport ds = new ScheduleReport();

                global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny();
                any1.Namespace       = "http://www.w3.org/2001/XMLSchema";
                any1.MinOccurs       = new decimal(0);
                any1.MaxOccurs       = decimal.MaxValue;
                any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
                sequence.Items.Add(any1);
                global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny();
                any2.Namespace       = "urn:schemas-microsoft-com:xml-diffgram-v1";
                any2.MinOccurs       = new decimal(1);
                any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
                sequence.Items.Add(any2);
                global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute();
                attribute1.Name       = "namespace";
                attribute1.FixedValue = ds.Namespace;
                type.Attributes.Add(attribute1);
                global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute();
                attribute2.Name       = "tableTypeName";
                attribute2.FixedValue = "DataTable1DataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
                if (xs.Contains(dsSchema.TargetNamespace))
                {
                    global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
                    global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
                    try {
                        global::System.Xml.Schema.XmlSchema schema = null;
                        dsSchema.Write(s1);
                        for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext();)
                        {
                            schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));
                            s2.SetLength(0);
                            schema.Write(s2);
                            if ((s1.Length == s2.Length))
                            {
                                s1.Position = 0;
                                s2.Position = 0;
                                for (; ((s1.Position != s1.Length) &&
                                        (s1.ReadByte() == s2.ReadByte()));)
                                {
                                    ;
                                }
                                if ((s1.Position == s1.Length))
                                {
                                    return(type);
                                }
                            }
                        }
                    }
                    finally {
                        if ((s1 != null))
                        {
                            s1.Close();
                        }
                        if ((s2 != null))
                        {
                            s2.Close();
                        }
                    }
                }
                xs.Add(dsSchema);
                return(type);
            }
示例#11
0
 public ResponseJson GroupRequest(string token, ReportFilter filter)
 {
     if (AuthData.GetRole(token) == Role.NoLogin)
     {
         return ResponseJson.GetResponseJson(string.Empty, false);
     }
     if (filter == null) filter = new ReportFilter();
     var data = DataProcess.GetGroupScheduleRequestLogs(filter);
     var total = DataProcess.GetCountGroupScheduleRequestLogs(filter);
     var resultObject = new ScheduleReport() { ScheduleLogs = data, Total = total, NumberOfPages = (total + filter.GetCorrectSize() - 1) / filter.GetCorrectSize() };
     return ResponseJson.GetResponseJson(resultObject);
 }