protected void okRadButton_Click(object sender, EventArgs e)
        {
            var    report = new StiReport();
            string path   = Server.MapPath("RequestTypeReport.mrt");

            report.Load(path);

            //var fromDate = Convertor.ToGregorianDate(fromDateRadMaskedTextBox.Text);
            //var toDate = Convertor.ToGregorianDate(toDateRadMaskedTextBox.Text);
            var fromDate = fromDateRadMaskedTextBox.Text.ConvertToDateTime();
            var toDate   = toDateRadMaskedTextBox.Text.ConvertToDateTime();

            long value1;

            long.TryParse(firstRequestTypeRadComboBox.SelectedValue, out value1);

            long value2;

            long.TryParse(secoundRequestTypeRadComboBox.SelectedValue, out value2);

            long value3;

            long.TryParse(thirdRequestTypeRadComboBox.SelectedValue, out value3);

            var requestBusinessActions = new RequestBusinessActions(toDate, fromDate, value1, value2, value3);
            var requestCollection      = requestBusinessActions.RequestCollection;

            //set data source
            report.RegBusinessObject("Request", "Request", requestCollection);
            report.Dictionary.Synchronize();
            requestTypeStiWebViewer.Report = report;
        }
        protected void okRadButton_Click(object sender, EventArgs e)
        {
            var    report = new StiReport();
            string path   = Server.MapPath("RequestPriority.mrt");

            report.Load(path);

            long value;
            long value1 = 0;
            long value2 = 0;

            long.TryParse(prirityDropDownList.SelectedValue, out value);
            switch (value)
            {
            case 10:
                value1 = 0;
                value2 = 10;
                break;

            case 30:
                value1 = 10;
                value2 = 30;
                break;

            case 80:
                value1 = 30;
                value2 = 80;
                break;

            case 100:
                value1 = 80;
                value2 = 100;
                break;
            }
            //var fromDate = Convertor.ToGregorianDate(fromDateRadMaskedTextBox.Text);
            //var toDate = Convertor.ToGregorianDate(toDateRadMaskedTextBox.Text);
            var fromDate = fromDateRadMaskedTextBox.Text.ConvertToDateTime();
            var toDate   = toDateRadMaskedTextBox.Text.ConvertToDateTime();

            //get data
            //var RequestTypeReportManager = new RequestTypeReportManager();
            //var Helpdesk90Entities = new DAL.Helpdesk90Entities();

            var requestBusinessActions = new RequestBusinessActions(toDate, fromDate, value1, value2);
            var requestCollection      = requestBusinessActions.RequestCollection;

            //set data source
            report.RegBusinessObject("RequestPriority", "RequestPriority", requestCollection);
            report.Dictionary.Synchronize();
            requestTypeStiWebViewer.Report = report;
        }
Esempio n. 3
0
        protected void okRadButton_Click(object sender, EventArgs e)
        {
            var    report = new StiReport();
            string path   = Server.MapPath("RequestByOrganizationReport.mrt");

            report.Load(path);
            report.Compile();

            //var fromDate = Convertor.ToGregorianDate(fromDateRadMaskedTextBox.Text);
            //var toDate = Convertor.ToGregorianDate(toDateRadMaskedTextBox.Text);
            var fromDate = fromDateRadMaskedTextBox.Text.ConvertToDateTime();
            var toDate   = toDateRadMaskedTextBox.Text.ConvertToDateTime();

            long value1 = 0;

            if (firstOrganChartRadComboBox.Items.Count > 0)
            {
                long.TryParse(firstOrganChartRadComboBox.SelectedValue, out value1);
            }

            long value2 = 0;

            if (secoundOrganChartRadComboBox.Items.Count > 0)
            {
                long.TryParse(secoundOrganChartRadComboBox.SelectedValue, out value2);
            }

            long value3 = 0;

            if (thirdOrganChartRadComboBox.Items.Count > 0)
            {
                long.TryParse(thirdOrganChartRadComboBox.SelectedValue, out value3);
            }

            var requestBusinessActions = new RequestBusinessActions();
            List <RequestInsertUserAction> requestCollection = requestBusinessActions.ReportByOrganization(fromDate, toDate, value1, value2, value3);

            if (requestCollection != null)
            {
                requestCollection = requestCollection.OrderBy(p => p.OrganizationTitle).ToList();
            }
            report.RegBusinessObject("RequestOrganization", "RequestOrganization", requestCollection);
            var persianDate = ReportTextHelper.GetPersianDate();

            report["TodayDate"] = persianDate;
            report.Dictionary.Synchronize();
            requestTypeStiWebViewer.Report = report;
        }
        protected void okRadButton_Click(object sender, EventArgs e)
        {
            var    report = new StiReport();
            string path   = Server.MapPath("RequestSupportExpertReport.mrt");

            report.Load(path);
            report.Compile();

            List <RequestInsertUserAction> list;

            try
            {
                var x = SupportGroupList.SelectedItem.Value;
                var y = ExpertsGroupList.SelectedItem.Value;

                if (x != null && y != null)
                {
                    //var fromDate = Convertor.ToGregorianDate(fromDateRadMaskedTextBox.Text);
                    //var toDate = Convertor.ToGregorianDate(toDateRadMaskedTextBox.Text);
                    var fromDate = fromDateRadMaskedTextBox.Text.ConvertToDateTime();
                    var toDate   = toDateRadMaskedTextBox.Text.ConvertToDateTime();

                    //get dat
                    var requestBusinessActions = new RequestBusinessActions();
                    list = requestBusinessActions.ReportBySupportGroup(long.Parse(x), fromDate, toDate, long.Parse(y));
                    //set data source
                    report.RegBusinessObject("RequestSupportGroupReport", "RequestSupportGroupReport", list);
                    var persianDate = ReportTextHelper.GetPersianDate();
                    report["TodayDate"] = persianDate;
                    report.Dictionary.Synchronize();
                    requestTypeStiWebViewer.Report = report;
                }
                else
                {
                    //Response.Write("<script>alert('گروه را انتخاب نمایید')</script>");
                }
            }
            catch (Exception)
            {
                //Response.Write("<script>alert('گروه یا کارشناس پشتیبانی معتبر نمی باشد')</script>");
            }
        }
        protected void okRadButton_Click(object sender, EventArgs e)
        {
            var    report = new StiReport();
            string path   = Server.MapPath("RequestStatus.mrt");

            report.Load(path);
            List <RequestBusinessActions> requestCollection;

            //get data
            try
            {
                long value;
                var  result = long.TryParse(workFlowRadComboBox.SelectedValue, out value);

                //var fromDate = Convertor.ToGregorianDate(fromDateRadMaskedTextBox.Text);
                //var toDate = Convertor.ToGregorianDate(toDateRadMaskedTextBox.Text);
                var fromDate = fromDateRadMaskedTextBox.Text.ConvertToDateTime();
                var toDate   = toDateRadMaskedTextBox.Text.ConvertToDateTime();

                var taskId = long.Parse(workFlowRadComboBox.SelectedValue);

                var requestBusinessActions = new RequestBusinessActions(toDate, fromDate, taskId, true);
                requestCollection = requestBusinessActions.RequestCollection;
            }
            catch (Exception)
            {
                Response.Write("<script>alert('نوع درخواست را انتخاب نمایید')</script>");
                return;
            }


            //var hrmwfEntities = new HRMWFEntities();
            //var q = (from r in Helpdesk90Entities.Request
            //         join entity in hrmwfEntities.Entity on r.OwnnerEntityID equals entity.EntityID
            //         where (r.InsertDate <= toDate && r.InsertDate >= fromDate)
            //         select new
            //         {
            //             r.RegisterByName,
            //             r.InsertDate,
            //             r.OptionalLocation,
            //             r.RequestPriority,
            //             r.OwnnerEntityID,
            //             r.RequestID,
            //             RequestTypeTitle = r.RequestType.Title,
            //             Requester = entity.PersonalCardNo
            //         }
            //    ).ToList();

            //var RIDList = q.Select(r => r.RequestID.ToString()).ToList();

            //var submitRequestWorkFlow = new SubmitRequestWorkFlow();
            //var dic = submitRequestWorkFlow.LastTaskInstanceGetByEntityID(RIDList);


            //var dataSource = (from d in q
            //                  join
            //                  i in dic on d.RequestID.ToString() equals i.Key
            //                  select new
            //                  {
            //                      d.Requester,
            //                      d.RegisterByName,
            //                      InsertDate = Convertor.ToPersianDate(d.InsertDate),
            //                      d.OptionalLocation,
            //                      d.RequestPriority,
            //                      CurrentStatus = i.Value.TaskTitle,
            //                      d.RequestTypeTitle
            //                  });

            //set data source
            report.RegBusinessObject("RequestStatus", "RequestStatus", requestCollection);
            report.Dictionary.Synchronize();
            requestTypeStiWebViewer.Report = report;
        }