示例#1
0
        private void FillReport(bool isInitial = false, bool throwException = true)
        {
            string rep_params        = vals.Text;
            ReportGenericRequest req = new ReportGenericRequest();

            req.paramString = rep_params;

            ListResponse <Model.Reports.RT401> resp = _reportsService.ChildGetAll <Model.Reports.RT401>(req);

            if (!resp.Success)
            {
                Common.ReportErrorMessage(resp, GetGlobalResourceObject("Errors", "Error_1").ToString(), GetGlobalResourceObject("Errors", "ErrorLogId").ToString());
            }

            resp.Items.ForEach(x => x.StatusString = GetLocalResourceObject("Status" + x.status.ToString()).ToString());
            Dictionary <string, string> parameters = Web.UI.Forms.Common.FetchReportParameters(texts.Text);
            LoansReport h = new LoansReport(parameters);

            h.RightToLeft       = _systemService.SessionHelper.CheckIfArabicSession() ? DevExpress.XtraReports.UI.RightToLeft.Yes : DevExpress.XtraReports.UI.RightToLeft.No;
            h.RightToLeftLayout = _systemService.SessionHelper.CheckIfArabicSession() ? DevExpress.XtraReports.UI.RightToLeftLayout.Yes : DevExpress.XtraReports.UI.RightToLeftLayout.No;
            h.DataSource        = resp.Items;

            //string from = DateTime.Parse(req.Parameters["_fromDate"]).ToString(_systemService.SessionHelper.GetDateformat());
            //string to = DateTime.Parse(req.Parameters["_toDate"]).ToString(_systemService.SessionHelper.GetDateformat());
            string user = _systemService.SessionHelper.GetCurrentUser();


            h.Parameters["User"].Value = user;
            //    h.Parameters["Filters"].Value = texts.Text;
            h.CreateDocument();


            ASPxWebDocumentViewer1.DataBind();
            ASPxWebDocumentViewer1.OpenReport(h);
        }
示例#2
0
        protected void FillTimeApproval(int dayId, int employeeId)
        {
            try
            {
                string rep_params = "";
                Dictionary <string, string> parameters = new Dictionary <string, string>();
                parameters.Add("1", employeeId.ToString());
                parameters.Add("2", dayId.ToString());
                parameters.Add("3", dayId.ToString());
                parameters.Add("4", "0");
                parameters.Add("5", "0");
                parameters.Add("6", "0");
                parameters.Add("7", "0");
                parameters.Add("8", "0");
                parameters.Add("9", "0");
                parameters.Add("10", "0");
                foreach (KeyValuePair <string, string> entry in parameters)
                {
                    rep_params += entry.Key.ToString() + "|" + entry.Value + "^";
                }
                if (rep_params.Length > 0)
                {
                    if (rep_params[rep_params.Length - 1] == '^')
                    {
                        rep_params = rep_params.Remove(rep_params.Length - 1);
                    }
                }



                ReportGenericRequest req = new ReportGenericRequest();
                req.paramString = rep_params;


                ListResponse <Time> Times = _timeAttendanceService.ChildGetAll <Time>(req);
                timeCode = ConstTimeVariationType.TimeCodeList(_systemService);
                if (!Times.Success)
                {
                    Common.errorMessage(Times);
                    return;
                }
                Times.Items.ForEach(x =>
                {
                    x.timeCodeString = timeCode.Where(y => y.key == Convert.ToInt16(x.timeCode)).Count() != 0 ? timeCode.Where(y => y.key == Convert.ToInt32(x.timeCode)).First().value : string.Empty;

                    x.statusString = FillApprovalStatus(x.status);
                });

                Store3.DataSource = Times.Items;
                ////List<ActiveLeave> leaves = new List<ActiveLeave>();
                //leaves.Add(new ActiveLeave() { destination = "dc", employeeId = 8, employeeName = new Model.Employees.Profile.EmployeeName() { fullName = "vima" }, endDate = DateTime.Now.AddDays(10) });


                Store3.DataBind();
            }
            catch (Exception exp)
            {
                X.Msg.Alert(Resources.Common.Error, exp.Message).Show();
            }
        }
示例#3
0
        protected void Store1_RefreshData(object sender, StoreReadDataEventArgs e)
        {
            //GEtting the filter from the page
            string rep_params        = vals.Text;
            ReportGenericRequest req = new ReportGenericRequest();

            req.paramString = rep_params;



            //Fetching the corresponding list

            //in this test will take a list of News

            ListResponse <TimePerformance> resp = _timeAttendanceService.ChildGetAll <TimePerformance>(req);

            if (!resp.Success)
            {
                Common.errorMessage(resp);
                return;
            }
            this.Store1.DataSource = resp.Items;
            e.Total = resp.count;

            this.Store1.DataBind();

            FillChart(resp);
        }
示例#4
0
        private void FillApprovalsStore(string leaveId, string employeeId, string returnType)
        {
            ReportGenericRequest req = new ReportGenericRequest();

            req.paramString = "8|" + leaveId;



            ListResponse <Model.LeaveManagement.LeaveReturnApproval> response = _leaveManagementService.ChildGetAll <Model.LeaveManagement.LeaveReturnApproval>(req);

            if (!response.Success)
            {
                Common.errorMessage(response);
                return;
            }
            List <XMLDictionary> statusList = Common.XMLDictionaryList(_systemService, "13");

            response.Items.ForEach(x =>
            {
                x.stringStatus = statusList.Where(y => y.key == x.status).Count() != 0 ? statusList.Where(y => y.key == x.status).First().value : string.Empty;
            }
                                   );
            ApprovalsStore.DataSource = response.Items;
            ApprovalsStore.DataBind();
        }
示例#5
0
        private void FillReport(bool isInitial = false, bool throwException = true)
        {
            string rep_params        = vals.Text;
            ReportGenericRequest req = new ReportGenericRequest();

            req.paramString = rep_params;

            ListResponse <Model.Reports.RT508> resp = _reportsService.ChildGetAll <Model.Reports.RT508>(req);

            if (!resp.Success)
            {
                Common.ReportErrorMessage(resp, GetGlobalResourceObject("Errors", "Error_1").ToString(), GetGlobalResourceObject("Errors", "ErrorLogId").ToString());
            }

            string getLan = _systemService.SessionHelper.getLangauge();

            Dictionary <string, string> parameters = Web.UI.Forms.Common.FetchReportParameters(texts.Text);
            PayrollLeavePaymentsReport  h          = new PayrollLeavePaymentsReport(parameters, getLan);

            h.RightToLeft       = _systemService.SessionHelper.CheckIfArabicSession() ? DevExpress.XtraReports.UI.RightToLeft.Yes : DevExpress.XtraReports.UI.RightToLeft.No;
            h.RightToLeftLayout = _systemService.SessionHelper.CheckIfArabicSession() ? DevExpress.XtraReports.UI.RightToLeftLayout.Yes : DevExpress.XtraReports.UI.RightToLeftLayout.No;
            h.DataSource        = resp.Items;
            //  h.Parameters["Fitlers"].Value = texts.Text;

            h.CreateDocument();


            ASPxWebDocumentViewer1.DataBind();
            ASPxWebDocumentViewer1.OpenReport(h);
        }
示例#6
0
        private void FillReport(bool throwException = true)
        {
            int    count             = 0;
            string rep_params        = vals.Text;
            ReportGenericRequest req = new ReportGenericRequest();

            req.paramString = rep_params;



            ListResponse <Model.Reports.RT802> resp = _reportsService.ChildGetAll <Model.Reports.RT802>(req);

            if (!resp.Success)
            {
                Common.ReportErrorMessage(resp, GetGlobalResourceObject("Errors", "Error_1").ToString(), GetGlobalResourceObject("Errors", "ErrorLogId").ToString());
            }
            resp.Items.ForEach(x => { x.TypeString = GetGlobalResourceObject("Common", "TrType" + x.type.ToString()).ToString(); x.ClassIdString = GetGlobalResourceObject("Classes", "Class" + x.classId.ToString()) != null ? GetGlobalResourceObject("Classes", "Class" + x.classId.ToString()).ToString() : "NA"; x.DateString = x.eventDt.ToString(_systemService.SessionHelper.GetDateformat() + " HH:mm", CultureInfo.CurrentCulture); });
            Dictionary <string, string> parameters = Web.UI.Forms.Common.FetchReportParameters(texts.Text);
            AuditTrail h = new AuditTrail(parameters);

            h.RightToLeft       = _systemService.SessionHelper.CheckIfArabicSession() ? DevExpress.XtraReports.UI.RightToLeft.Yes : DevExpress.XtraReports.UI.RightToLeft.No;
            h.RightToLeftLayout = _systemService.SessionHelper.CheckIfArabicSession() ? DevExpress.XtraReports.UI.RightToLeftLayout.Yes : DevExpress.XtraReports.UI.RightToLeftLayout.No;

            h.Parameters["User"].Value = _systemService.SessionHelper.GetCurrentUser();
            //   h.Parameters["Filters"].Value = texts.Text;
            h.DataSource = resp.Items;


            h.CreateDocument();
            ASPxWebDocumentViewer1.OpenReport(h);
            ASPxWebDocumentViewer1.DataBind();
        }
示例#7
0
        private void FillStore2(string employeeId)
        {
            ReportGenericRequest req = new ReportGenericRequest();

            req.paramString = vals.Text;
            if (string.IsNullOrEmpty(vals.Text))
            {
                req.paramString = "3|" + employeeId;
            }
            else
            {
                req.paramString = vals.Text + "^3|" + employeeId;
            }

            bool rtl = _systemService.SessionHelper.CheckIfArabicSession();

            //ListResponse<Model.Reports.RT309> resp = _reportsService.ChildGetAll<Model.Reports.RT309>(req);
            //if (!resp.Success)
            //{
            //    Common.errorMessage(resp);
            //    return;
            //}

            ListResponse <UnschedulePunchDetails> resp = _timeAttendanceService.ChildGetAll <UnschedulePunchDetails>(req);

            if (!resp.Success)
            {
                Common.errorMessage(resp);
                return;
            }
            Web.UI.Forms.Utilities.Functions test = new Functions();
            //DateTime temp;
            resp.Items.ForEach(x =>
            {
                //x.shiftId = buildShiftValue(x.shiftLog);
                //if (DateTime.TryParseExact(x.dayId, "yyyyMMdd", new CultureInfo("en"), DateTimeStyles.AdjustToUniversal, out temp))
                //x.dayIdDateTime = temp;

                if (rtl)
                {
                    x.dayIdDateTime = DateTime.ParseExact(x.dayId, "yyyyMMdd", new CultureInfo("en")).ToString("dddd  dd MMMM yyyy ", new System.Globalization.CultureInfo("ar-AE"));
                }
                else
                {
                    x.dayIdDateTime = DateTime.ParseExact(x.dayId, "yyyyMMdd", new CultureInfo("en")).ToString("dddd  dd MMMM yyyy ", new System.Globalization.CultureInfo("en-US"));
                }

                x.strDuration = test.timeformat(Convert.ToInt32(x.duration));
            }


                               );
            //store2.DataSource = resp.Items;
            //store2.DataBind();

            store3.DataSource = resp.Items;
            store3.DataBind();
        }
示例#8
0
        protected void Load_Click(object sender, DirectEventArgs e)
        {
            pnlTools.Hidden = true;
            if (branchId.Value == null || branchId.Value.ToString() == string.Empty)
            {
                X.Msg.Alert(Resources.Common.Error, (string)GetLocalResourceObject("SelectBranch")).Show();
                return;
            }

            //Proceed to load

            //BranchScheduleRecordRequest reqFS = new BranchScheduleRecordRequest();
            //reqFS.EmployeeId = 0;
            //reqFS.FromDayId = dateFrom.SelectedDate.ToString("yyyyMMdd");
            //reqFS.ToDayId = dateFrom.SelectedDate.ToString("yyyyMMdd");
            //reqFS.BranchId = Convert.ToInt32(branchId.SelectedItem.Value);
            string rep_params = "";
            Dictionary <string, string> parameters = new Dictionary <string, string>();



            parameters.Add("2", dateFrom.SelectedDate.ToString("yyyyMMdd"));

            parameters.Add("3", dateFrom.SelectedDate.ToString("yyyyMMdd"));


            parameters.Add("4", branchId.SelectedItem.Value);

            foreach (KeyValuePair <string, string> entry in parameters)
            {
                rep_params += entry.Key.ToString() + "|" + entry.Value + "^";
            }
            if (rep_params.Length > 0)
            {
                if (rep_params[rep_params.Length - 1] == '^')
                {
                    rep_params = rep_params.Remove(rep_params.Length - 1);
                }
            }



            ReportGenericRequest reqFS = new ReportGenericRequest();

            reqFS.paramString = rep_params;


            ListResponse <FlatSchedule> response = _timeAttendanceService.ChildGetAll <FlatSchedule>(reqFS);

            if (!response.Success)
            {
                X.Msg.Alert(Resources.Common.Error, (string)GetLocalResourceObject("ErrorGettingSchedule")).Show();
                return;
            }
            this.dayId.Value = string.Empty;
            BuildSchedule(response.Items);
        }
示例#9
0
        private void FillReport(bool isInitial = false, bool throwException = true)
        {
            string rep_params        = vals.Text;
            ReportGenericRequest req = new ReportGenericRequest();

            req.paramString = rep_params;

            ListResponse <Model.Reports.RT602> resp = _reportsService.ChildGetAll <Model.Reports.RT602>(req);

            if (!resp.Success)
            {
                Common.ReportErrorMessage(resp, GetGlobalResourceObject("Errors", "Error_1").ToString(), GetGlobalResourceObject("Errors", "ErrorLogId").ToString());
            }

            resp.Items.ForEach(x =>
            {
                if (x.hireDate != null)
                {
                    x.hireDateString = x.hireDate.Value.ToString(_systemService.SessionHelper.GetDateformat());
                }
                else
                {
                    x.hireDateString = string.Empty;
                }
                if (x.lastReturnDate != null)
                {
                    x.lastReturnDateString = x.lastReturnDate.Value.ToString(_systemService.SessionHelper.GetDateformat());
                }
                else
                {
                    x.lastReturnDateString = string.Empty;
                }
            });
            Dictionary <string, string> parameters = Web.UI.Forms.Common.FetchReportParameters(texts.Text);
            LeaveBalance h = new LeaveBalance(parameters);

            h.DataSource = resp.Items;

            h.RightToLeft       = _systemService.SessionHelper.CheckIfArabicSession() ? DevExpress.XtraReports.UI.RightToLeft.Yes : DevExpress.XtraReports.UI.RightToLeft.No;
            h.RightToLeftLayout = _systemService.SessionHelper.CheckIfArabicSession() ? DevExpress.XtraReports.UI.RightToLeftLayout.Yes : DevExpress.XtraReports.UI.RightToLeftLayout.No;


            //string from = DateTime.Parse(req.Parameters["_fromDate"]).ToString(_systemService.SessionHelper.GetDateformat());
            //string to = DateTime.Parse(req.Parameters["_toDate"]).ToString(_systemService.SessionHelper.GetDateformat());
            string user = _systemService.SessionHelper.GetCurrentUser();

            //h.Parameters["From"].Value = from;
            //h.Parameters["To"].Value = to;
            h.Parameters["User"].Value = user;
            //    h.Parameters["Fitlers"].Value = texts.Text;
            h.CreateDocument();


            ASPxWebDocumentViewer1.DataBind();
            ASPxWebDocumentViewer1.OpenReport(h);
        }
示例#10
0
        /// <summary>
        /// Adding new record
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>



        protected void Store1_RefreshData(object sender, StoreReadDataEventArgs e)
        {
            try
            {
                string rep_params      = vals.Text;
                ReportGenericRequest r = new ReportGenericRequest();
                r.paramString = rep_params;
                ListResponse <Time> resp = _timeAttendanceService.ChildGetAll <Time>(r);
                if (!resp.Success)
                {
                    Common.errorMessage(resp);
                    return;
                }
                bool rtl = _systemService.SessionHelper.CheckIfArabicSession();
                List <XMLDictionary> timeCodeList = ConstTimeVariationType.TimeCodeList(_systemService);
                int currentTimeCode;
                resp.Items.ForEach(
                    x =>
                {
                    if (!string.IsNullOrEmpty(x.clockDuration))
                    {
                        x.clockDuration = time(Convert.ToInt32(x.clockDuration), true);
                    }
                    if (!string.IsNullOrEmpty(x.duration))
                    {
                        x.duration = time(Convert.ToInt32(x.duration), true);
                    }
                    if (Int32.TryParse(x.timeCode, out currentTimeCode))
                    {
                        x.timeCodeString = timeCodeList.Where(y => y.key == Convert.ToInt32(x.timeCode)).Count() != 0 ? timeCodeList.Where(y => y.key == Convert.ToInt32(x.timeCode)).First().value : string.Empty;
                    }
                    x.statusString = FillApprovalStatus(x.status);
                    if (!string.IsNullOrEmpty(x.damageLevel))
                    {
                        x.damageLevel = FillDamageLevelString(Convert.ToInt16(x.damageLevel));
                    }
                    if (rtl)
                    {
                        x.dayIdString = ((DateTime)x.date).ToString("dddd  dd MMMM yyyy ", new System.Globalization.CultureInfo("ar-AE"));
                    }
                    else
                    {
                        x.dayIdString = ((DateTime)x.date).ToString("dddd  dd MMMM yyyy ", new System.Globalization.CultureInfo("en-US"));
                    }
                }
                    );

                Store1.DataSource = resp.Items;
                Store1.DataBind();
            }
            catch (Exception exp)
            {
                X.Msg.Alert(Resources.Common.Error, exp.Message).Show();
            }
        }
示例#11
0
        private void FillReport(bool isInitial = false, bool throwException = true)
        {
            List <XMLDictionary> statusList = Common.XMLDictionaryList(_systemService, "13");


            string rep_params        = vals.Text;
            ReportGenericRequest req = new ReportGenericRequest();

            req.paramString = rep_params;


            ListResponse <Model.Reports.RT601> resp = _reportsService.ChildGetAll <Model.Reports.RT601>(req);

            if (!resp.Success)
            {
                Common.ReportErrorMessage(resp, GetGlobalResourceObject("Errors", "Error_1").ToString(), GetGlobalResourceObject("Errors", "ErrorLogId").ToString());
            }
            errorMSG.Text = "";
            string format = _systemService.SessionHelper.GetDateformat();

            resp.Items.ForEach(s =>
            {
                s.endDateString   = s.endDate.ToString(format, CultureInfo.CurrentCulture);
                s.startDateString = s.startDate.ToString(format, CultureInfo.CurrentCulture);
                if (s.returnDate.HasValue)
                {
                    s.returnDateString = s.returnDate.Value.ToString(format, CultureInfo.CurrentCulture);
                }

                s.isPaidString = s.isPaid ? GetLocalResourceObject("Paid1").ToString() : GetLocalResourceObject("Paid0").ToString();
                s.statusString = statusList.Where(y => y.key == s.status).Count() != 0 ? statusList.Where(y => y.key == s.status).First().value : "";
            });
            Dictionary <string, string> parameters = Web.UI.Forms.Common.FetchReportParameters(texts.Text);
            LeaveList h = new LeaveList(parameters);

            h.DataSource = resp.Items;

            h.RightToLeft       = _systemService.SessionHelper.CheckIfArabicSession() ? DevExpress.XtraReports.UI.RightToLeft.Yes : DevExpress.XtraReports.UI.RightToLeft.No;
            h.RightToLeftLayout = _systemService.SessionHelper.CheckIfArabicSession() ? DevExpress.XtraReports.UI.RightToLeftLayout.Yes : DevExpress.XtraReports.UI.RightToLeftLayout.No;

            //string from = DateTime.Parse(req.Parameters["_fromDate"]).ToString(_systemService.SessionHelper.GetDateformat());
            //string to = DateTime.Parse(req.Parameters["_toDate"]).ToString(_systemService.SessionHelper.GetDateformat());
            string user = _systemService.SessionHelper.GetCurrentUser();


            h.Parameters["User"].Value = user;
            //  h.Parameters["Fitlers"].Value = texts.Text;
            h.CreateDocument();


            ASPxWebDocumentViewer1.DataBind();
            ASPxWebDocumentViewer1.OpenReport(h);
        }
示例#12
0
        public void FillReport(bool throwException = true)
        {
            string rep_params        = vals.Text;
            ReportGenericRequest req = new ReportGenericRequest();

            req.paramString = rep_params;
            ListResponse <Model.Reports.RT201> resp = _reportsService.ChildGetAll <Model.Reports.RT201>(req);

            //if (!resp.Success)
            //{

            //    throw new Exception(resp.Error + "<br>" + GetGlobalResourceObject("Errors", "ErrorLogId") + resp.LogId + "</br>");

            //}
            if (!resp.Success)
            {
                Common.ReportErrorMessage(resp, GetGlobalResourceObject("Errors", "Error_1").ToString(), GetGlobalResourceObject("Errors", "ErrorLogId").ToString());
            }

            string getLang = _systemService.SessionHelper.getLangauge();

            Dictionary <string, string> parameters = Web.UI.Forms.Common.FetchReportParameters(texts.Text);
            SalaryHistory h = new SalaryHistory(parameters, getLang);

            h.RightToLeft       = _systemService.SessionHelper.CheckIfArabicSession() ? DevExpress.XtraReports.UI.RightToLeft.Yes : DevExpress.XtraReports.UI.RightToLeft.No;
            h.RightToLeftLayout = _systemService.SessionHelper.CheckIfArabicSession() ? DevExpress.XtraReports.UI.RightToLeftLayout.Yes : DevExpress.XtraReports.UI.RightToLeftLayout.No;
            resp.Items.ForEach(x => {
                x.PaymentFrequencyString = x.paymentFrequency.HasValue? GetGlobalResourceObject("Common", ((PaymentFrequency)x.paymentFrequency).ToString()).ToString():"";
                x.SalaryTypeString       = x.salaryType.HasValue ? GetGlobalResourceObject("Common", ((SalaryType)x.salaryType).ToString()).ToString() : "";
                x.EffectiveDateString    = x.effectiveDate.ToString(_systemService.SessionHelper.GetDateformat(), CultureInfo.CurrentCulture);
            });

            h.DataSource = resp.Items;
            string user = _systemService.SessionHelper.GetCurrentUser();

            h.Parameters["User"].Value = user;


            h.CreateDocument();
            //string format = "Pdf";
            //string fileName = String.Format("Report.{0}", format);
            //MemoryStream ms = new MemoryStream();
            //h.ExportToPdf(ms,new DevExpress.XtraPrinting.PdfExportOptions() { ShowPrintDialogOnOpen = true });
            //Response.Clear();
            //Response.ContentType = "application/pdf";
            //Response.AddHeader("Content-Disposition", String.Format("{0}; filename={1}", "inline", fileName));
            //Response.BinaryWrite(ms.ToArray());
            //Response.End();
            ASPxWebDocumentViewer1.OpenReport(h);
            ASPxWebDocumentViewer1.DataBind();
        }
示例#13
0
        private void FillReport(bool isInitial = false, bool throwException = true)
        {
            string rep_params        = vals.Text;
            ReportGenericRequest req = new ReportGenericRequest();

            req.paramString = rep_params;

            ListResponse <Model.Reports.RT113> resp = _reportsService.ChildGetAll <Model.Reports.RT113>(req);



            //if (!resp.Success)
            //{
            //    throw new Exception(resp.Error + "<br>" + GetGlobalResourceObject("Errors", "ErrorLogId") + resp.LogId + "</br>");
            //}
            if (!resp.Success)
            {
                Common.ReportErrorMessage(resp, GetGlobalResourceObject("Errors", "Error_1").ToString(), GetGlobalResourceObject("Errors", "ErrorLogId").ToString());
            }


            resp.Items.ForEach(x => {
                x.licenseExpiryDateString = x.licenseExpiryDate == null ? " " : ((DateTime)x.licenseExpiryDate).ToString(_systemService.SessionHelper.GetDateformat());
                x.licenseIssueDateString  = x.licenseIssueDate == null ? " " : ((DateTime)x.licenseIssueDate).ToString(_systemService.SessionHelper.GetDateformat());
            });

            string getLang = _systemService.SessionHelper.getLangauge();

            Dictionary <string, string> parameters = Web.UI.Forms.Common.FetchReportParameters(texts.Text);
            BranchWorkforce             h          = new BranchWorkforce(parameters, getLang);

            h.RightToLeft       = _systemService.SessionHelper.CheckIfArabicSession() ? DevExpress.XtraReports.UI.RightToLeft.Yes : DevExpress.XtraReports.UI.RightToLeft.No;
            h.RightToLeftLayout = _systemService.SessionHelper.CheckIfArabicSession() ? DevExpress.XtraReports.UI.RightToLeftLayout.Yes : DevExpress.XtraReports.UI.RightToLeftLayout.No;
            h.DataSource        = resp.Items;

            //  string from = DateTime.Parse(req.Parameters["_fromDate"]).ToString(_systemService.SessionHelper.GetDateformat(), new CultureInfo("en"));
            //  string to = DateTime.Parse(req.Parameters["_toDate"]).ToString(_systemService.SessionHelper.GetDateformat(), new CultureInfo("en"));
            string user = _systemService.SessionHelper.GetCurrentUser();


            //h.Parameters["Fitlers"].Value = texts.Text;

            h.Parameters["User"].Value = user;


            h.CreateDocument();


            ASPxWebDocumentViewer1.DataBind();
            ASPxWebDocumentViewer1.OpenReport(h);
        }
示例#14
0
        private void FillReport(bool isInitial = false, bool throwException = true)
        {
            string rep_params = vals.Text;
            //PendingPunchListRequest req = new PendingPunchListRequest();
            //if (vals.Text == "")
            //{
            //    req.ppTypeParam = "0";
            //}
            //else
            //{
            //    req.ppTypeParam = rep_params.Substring(2, 1);
            //}
            //req.udid = "0";
            ReportGenericRequest req = new ReportGenericRequest();

            req.paramString = rep_params;
            ListResponse <Model.TimeAttendance.PendingPunch> resp = _timeAttendanceService.ChildGetAll <Model.TimeAttendance.PendingPunch>(req);

            if (!resp.Success)
            {
                Common.ReportErrorMessage(resp, GetGlobalResourceObject("Errors", "Error_1").ToString(), GetGlobalResourceObject("Errors", "ErrorLogId").ToString());
            }

            //resp.Items.ForEach(x =>
            //{
            //    if (x.hireDate != null)
            //        x.hireDateString = ((DateTime)(x.hireDate)).ToString(_systemService.SessionHelper.GetDateformat(), System.Threading.Thread.CurrentThread.CurrentCulture);
            //    if (x.terminationDate != null)
            //        x.terminationDateString = ((DateTime)(x.terminationDate)).ToString(_systemService.SessionHelper.GetDateformat(), System.Threading.Thread.CurrentThread.CurrentCulture);
            //});

            string getLan = _systemService.SessionHelper.getLangauge();

            Dictionary <string, string> parameters = Web.UI.Forms.Common.FetchReportParameters(texts.Text);
            PendingPunches h = new PendingPunches(parameters, getLan);

            h.RightToLeft       = _systemService.SessionHelper.CheckIfArabicSession() ? DevExpress.XtraReports.UI.RightToLeft.Yes : DevExpress.XtraReports.UI.RightToLeft.No;
            h.RightToLeftLayout = _systemService.SessionHelper.CheckIfArabicSession() ? DevExpress.XtraReports.UI.RightToLeftLayout.Yes : DevExpress.XtraReports.UI.RightToLeftLayout.No;



            //h.Parameters["User"].Value = _systemService.SessionHelper.GetCurrentUser();
            //   h.Parameters["Filters"].Value = texts.Text;
            h.DataSource = resp.Items;

            h.CreateDocument();


            ASPxWebDocumentViewer1.DataBind();
            ASPxWebDocumentViewer1.OpenReport(h);
        }
示例#15
0
        private void FillReport(bool isInitial = false, bool throwException = true)
        {
            string rep_params        = vals.Text;
            ReportGenericRequest req = new ReportGenericRequest();

            req.paramString = rep_params;
            ListResponse <Model.Reports.RT111> resp = _reportsService.ChildGetAll <Model.Reports.RT111>(req);



            //if (!resp.Success)
            //{
            //    throw new Exception(resp.Error + "<br>" + GetGlobalResourceObject("Errors", "ErrorLogId") + resp.LogId + "</br>");
            //}
            if (!resp.Success)
            {
                Common.ReportErrorMessage(resp, GetGlobalResourceObject("Errors", "Error_1").ToString(), GetGlobalResourceObject("Errors", "ErrorLogId").ToString());
                return;
            }


            Dictionary <string, string> parameters = Web.UI.Forms.Common.FetchReportParameters(texts.Text);



            BankAccounts h = new BankAccounts(parameters);

            h.RightToLeft       = _systemService.SessionHelper.CheckIfArabicSession() ? DevExpress.XtraReports.UI.RightToLeft.Yes : DevExpress.XtraReports.UI.RightToLeft.No;
            h.RightToLeftLayout = _systemService.SessionHelper.CheckIfArabicSession() ? DevExpress.XtraReports.UI.RightToLeftLayout.Yes : DevExpress.XtraReports.UI.RightToLeftLayout.No;
            h.DataSource        = resp.Items;

            //  string from = DateTime.Parse(req.Parameters["_fromDate"]).ToString(_systemService.SessionHelper.GetDateformat(), new CultureInfo("en"));
            //  string to = DateTime.Parse(req.Parameters["_toDate"]).ToString(_systemService.SessionHelper.GetDateformat(), new CultureInfo("en"));
            string user = _systemService.SessionHelper.GetCurrentUser();



            //h.Parameters["PositionName"].Value = jobInfo1.GetPosition();
            h.Parameters["User"].Value = user;

            //h.Parameters["Status"].Value = statusCombo.SelectedItem.Text;



            h.CreateDocument();


            ASPxWebDocumentViewer1.DataBind();
            ASPxWebDocumentViewer1.OpenReport(h);
        }
示例#16
0
        private void FillReport(bool isInitial = false, bool throwException = true)
        {
            string rep_params        = vals.Text;
            ReportGenericRequest req = new ReportGenericRequest();

            req.paramString = rep_params;
            ListResponse <Model.Reports.RT310> resp = _reportsService.ChildGetAll <Model.Reports.RT310>(req);

            if (!resp.Success)
            {
                Common.ReportErrorMessage(resp, GetGlobalResourceObject("Errors", "Error_1").ToString(), GetGlobalResourceObject("Errors", "ErrorLogId").ToString());
            }
            for (int i = resp.Items.Count - 1; i >= 0; i--)
            {
                DateTime parsed = DateTime.Now;
                if (DateTime.TryParseExact(resp.Items[i].dayId, "yyyyMMdd", new CultureInfo("en"), DateTimeStyles.AdjustToUniversal, out parsed))
                {
                    resp.Items[i].dayIdDateTime = parsed;
                    //x.dayIdString = parsed.ToString(_systemService.SessionHelper.GetDateformat());
                    // Use reformatted
                }
                else
                {
                    resp.Items.RemoveAt(i);
                }
            }
            Dictionary <string, string> parameters = Web.UI.Forms.Common.FetchReportParameters(texts.Text);
            AttendanceScheduleReport    h          = new AttendanceScheduleReport(resp.Items, _systemService.SessionHelper.CheckIfArabicSession(), _systemService.SessionHelper.GetDateformat(), parameters);

            h.PrintingSystem.Document.AutoFitToPagesWidth = 1;
            h.RightToLeft       = _systemService.SessionHelper.CheckIfArabicSession() ? DevExpress.XtraReports.UI.RightToLeft.Yes : DevExpress.XtraReports.UI.RightToLeft.No;
            h.RightToLeftLayout = _systemService.SessionHelper.CheckIfArabicSession() ? DevExpress.XtraReports.UI.RightToLeftLayout.Yes : DevExpress.XtraReports.UI.RightToLeftLayout.No;


            //string from = DateTime.ParseExact(req.Parameters["_fromDayId"], "yyyyMMdd", new CultureInfo("en")).ToString(_systemService.SessionHelper.GetDateformat(), new CultureInfo("en"));
            //string to = DateTime.ParseExact(req.Parameters["_toDayId"], "yyyyMMdd", new CultureInfo("en")).ToString(_systemService.SessionHelper.GetDateformat(), new CultureInfo("en"));
            h.Parameters["User"].Value = string.IsNullOrEmpty(_systemService.SessionHelper.GetCurrentUser())?" ": _systemService.SessionHelper.GetCurrentUser();

            //  h.Parameters["Fitlers"].Value = texts.Text;

            h.CreateDocument();


            ASPxWebDocumentViewer1.OpenReport(h);
        }
示例#17
0
        private void FillReport(bool isInitial = false, bool throwException = true)
        {
            string rep_params        = vals.Text;
            ReportGenericRequest req = new ReportGenericRequest();

            req.paramString = rep_params;

            ListResponse <Model.Reports.RT503> resp = _reportsService.ChildGetAll <Model.Reports.RT503>(req);

            if (!resp.Success)
            {
                Common.ReportErrorMessage(resp, GetGlobalResourceObject("Errors", "Error_1").ToString(), GetGlobalResourceObject("Errors", "ErrorLogId").ToString());
            }



            string user = _systemService.SessionHelper.GetCurrentUser();


            bool isArabic = _systemService.SessionHelper.CheckIfArabicSession();


            int bulk = 1;

            if (filterBy.Value != null)
            {
                int.TryParse(filterBy.Value.ToString(), out bulk);
            }

            string getLan = _systemService.SessionHelper.getLangauge();

            Dictionary <string, string> parameters = Web.UI.Forms.Common.FetchReportParameters(texts.Text);
            GroupedPayrollCrossReport   h          = new GroupedPayrollCrossReport(resp.Items, isArabic, (GroupedPayrollCrossReport.GroupType)bulk, parameters, getLan);

            h.PrintingSystem.Document.AutoFitToPagesWidth = 1;


            h.Parameters["User"].Value = user;
            h.CreateDocument();


            ASPxWebDocumentViewer1.DataBind();
            ASPxWebDocumentViewer1.OpenReport(h);
        }
示例#18
0
        public void FillReport(bool throwException = true)
        {
            string rep_params        = vals.Text;
            ReportGenericRequest req = new ReportGenericRequest();

            req.paramString = rep_params;
            ListResponse <Model.Reports.RT202> resp = _reportsService.ChildGetAll <Model.Reports.RT202>(req);

            resp.Items.ForEach(x =>
            {
                if (x.prevBasicAmount == 0)
                {
                    x.prevBasicAmount = null; x.prevCurrencyRef = ""; x.PrevSalaryTypeString = "";
                }
            });
            if (!resp.Success)
            {
                Common.ReportErrorMessage(resp, GetGlobalResourceObject("Errors", "Error_1").ToString(), GetGlobalResourceObject("Errors", "ErrorLogId").ToString());
            }
            //resp.Items.ForEach(x => { x.PaymentFrequencyString = GetGlobalResourceObject("Common", ((PaymentFrequency)x.paymentFrequency).ToString()).ToString(); });

            resp.Items.ForEach(x =>
            {
                x.SalaryTypeString     = x.salaryType.HasValue ? GetGlobalResourceObject("Common", ((SalaryType)x.salaryType).ToString()).ToString() : "";
                x.PrevSalaryTypeString = x.prevSalaryType.HasValue ? GetGlobalResourceObject("Common", ((SalaryType)x.prevSalaryType).ToString()).ToString() : "";
                x.DateString           = x.effectiveDate != null ? ((DateTime)(x.effectiveDate)).ToString(_systemService.SessionHelper.GetDateformat(), CultureInfo.CurrentCulture) : "";
            });
            string getLan = _systemService.SessionHelper.getLangauge();
            Dictionary <string, string> parameters = Web.UI.Forms.Common.FetchReportParameters(texts.Text);
            SalaryChanges h = new SalaryChanges(parameters, getLan);

            h.RightToLeft       = _systemService.SessionHelper.CheckIfArabicSession() ? DevExpress.XtraReports.UI.RightToLeft.Yes : DevExpress.XtraReports.UI.RightToLeft.No;
            h.RightToLeftLayout = _systemService.SessionHelper.CheckIfArabicSession() ? DevExpress.XtraReports.UI.RightToLeftLayout.Yes : DevExpress.XtraReports.UI.RightToLeftLayout.No;

            h.DataSource = resp.Items;
            string user = _systemService.SessionHelper.GetCurrentUser();

            h.Parameters["User"].Value = user;


            h.CreateDocument();
            ASPxWebDocumentViewer1.OpenReport(h);
            ASPxWebDocumentViewer1.DataBind();
        }
示例#19
0
        private void FillReport(bool isInitial = false, bool throwException = true)
        {
            string rep_params        = vals.Text;
            ReportGenericRequest req = new ReportGenericRequest();

            req.paramString = rep_params;
            ListResponse <Model.Reports.RT502> resp = _reportsService.ChildGetAll <Model.Reports.RT502>(req);

            if (!resp.Success)
            {
                Common.ReportErrorMessage(resp, GetGlobalResourceObject("Errors", "Error_1").ToString(), GetGlobalResourceObject("Errors", "ErrorLogId").ToString());
            }

            resp.Items.ForEach(x =>
            {
                x.cvOvertime      = Math.Round(x.cvOvertime, 2);
                x.cvLateness      = Math.Round(x.cvLateness, 2);
                x.cvAbsence       = Math.Round(x.cvAbsence, 2);
                x.cvDisappearance = Math.Round(x.cvDisappearance, 2);
                x.cvMissedPunches = Math.Round(x.cvMissedPunches, 2);
            });

            Dictionary <string, string> parameters = Web.UI.Forms.Common.FetchReportParameters(texts.Text);

            PayrollPeriodTimeCodes h = new PayrollPeriodTimeCodes(parameters);

            h.DataSource = resp.Items;

            h.RightToLeft       = _systemService.SessionHelper.CheckIfArabicSession() ? DevExpress.XtraReports.UI.RightToLeft.Yes : DevExpress.XtraReports.UI.RightToLeft.No;
            h.RightToLeftLayout = _systemService.SessionHelper.CheckIfArabicSession() ? DevExpress.XtraReports.UI.RightToLeftLayout.Yes : DevExpress.XtraReports.UI.RightToLeftLayout.No;


            string user = _systemService.SessionHelper.GetCurrentUser();

            //h.Parameters["User"].Value = _systemService.SessionHelper.GetCurrentUser();
            //   h.Parameters["Filters"].Value = texts.Text;
            h.DataSource = resp.Items;

            h.CreateDocument();


            ASPxWebDocumentViewer1.DataBind();
            ASPxWebDocumentViewer1.OpenReport(h);
        }
示例#20
0
        private void FillReport(bool throwException = true)
        {
            string rep_params        = vals.Text;
            ReportGenericRequest req = new ReportGenericRequest();

            req.paramString = rep_params;
            ListResponse <Model.Reports.RT203> resp = _reportsService.ChildGetAll <Model.Reports.RT203>(req);

            //if (!resp.Success)
            //{
            //    throw new Exception(resp.Error + "<br>" + GetGlobalResourceObject("Errors", "ErrorLogId") + resp.LogId + "</br>");
            //}
            if (!resp.Success)
            {
                Common.ReportErrorMessage(resp, GetGlobalResourceObject("Errors", "Error_1").ToString(), GetGlobalResourceObject("Errors", "ErrorLogId").ToString());
            }
            Dictionary <string, string> parameters = Web.UI.Forms.Common.FetchReportParameters(texts.Text);

            string getLan = _systemService.SessionHelper.getLangauge();

            PointInTimeSalary h = new PointInTimeSalary(parameters, getLan);

            h.RightToLeft       = _systemService.SessionHelper.CheckIfArabicSession() ? DevExpress.XtraReports.UI.RightToLeft.Yes : DevExpress.XtraReports.UI.RightToLeft.No;
            h.RightToLeftLayout = _systemService.SessionHelper.CheckIfArabicSession() ? DevExpress.XtraReports.UI.RightToLeftLayout.Yes : DevExpress.XtraReports.UI.RightToLeftLayout.No;
            resp.Items.ForEach(x => { x.SalaryTypeString = x.salaryType.HasValue ? GetGlobalResourceObject("Common", ((SalaryType)x.salaryType).ToString()).ToString() : ""; });


            h.DataSource = resp.Items;

            //string from = DateTime.Parse(req.Parameters["_asOfDate"]).ToString(_systemService.SessionHelper.GetDateformat());

            string user = _systemService.SessionHelper.GetCurrentUser();



            h.Parameters["User"].Value = user;
            // h.Parameters["Fitlers"].Value = texts.Text;

            h.CreateDocument();
            ASPxWebDocumentViewer1.OpenReport(h);
            ASPxWebDocumentViewer1.DataBind();
        }
示例#21
0
        private void FillReport(bool isInitial = false, bool throwException = true)
        {
            string rep_params        = vals.Text;
            ReportGenericRequest req = new ReportGenericRequest();

            req.paramString = rep_params;
            ListResponse <Model.Reports.RT115> resp = _reportsService.ChildGetAll <Model.Reports.RT115>(req);

            if (!resp.Success)
            {
                Common.ReportErrorMessage(resp, GetGlobalResourceObject("Errors", "Error_1").ToString(), GetGlobalResourceObject("Errors", "ErrorLogId").ToString());
            }

            resp.Items.ForEach(x =>
            {
                if (x.hireDate != null)
                {
                    x.hireDateString = ((DateTime)(x.hireDate)).ToString(_systemService.SessionHelper.GetDateformat(), System.Threading.Thread.CurrentThread.CurrentCulture);
                }
                if (x.terminationDate != null)
                {
                    x.terminationDateString = ((DateTime)(x.terminationDate)).ToString(_systemService.SessionHelper.GetDateformat(), System.Threading.Thread.CurrentThread.CurrentCulture);
                }
            });
            Dictionary <string, string> parameters = Web.UI.Forms.Common.FetchReportParameters(texts.Text);
            IndemnityReport             h          = new IndemnityReport(parameters);

            h.RightToLeft       = _systemService.SessionHelper.CheckIfArabicSession() ? DevExpress.XtraReports.UI.RightToLeft.Yes : DevExpress.XtraReports.UI.RightToLeft.No;
            h.RightToLeftLayout = _systemService.SessionHelper.CheckIfArabicSession() ? DevExpress.XtraReports.UI.RightToLeftLayout.Yes : DevExpress.XtraReports.UI.RightToLeftLayout.No;



            h.Parameters["User"].Value = _systemService.SessionHelper.GetCurrentUser();
            //   h.Parameters["Filters"].Value = texts.Text;
            h.DataSource = resp.Items;

            h.CreateDocument();


            ASPxWebDocumentViewer1.DataBind();
            ASPxWebDocumentViewer1.OpenReport(h);
        }
示例#22
0
        private void FillTimeApproval(string tvId)
        {
            string rep_params = "";

            try
            {
                ReportGenericRequest r = new ReportGenericRequest();
                r.paramString = "12|" + tvId;



                ListResponse <Time> Times = _timeAttendanceService.ChildGetAll <Time>(r);
                if (!Times.Success)
                {
                    Common.errorMessage(Times);
                    return;
                }
                List <XMLDictionary> timeCodeList = ConstTimeVariationType.TimeCodeList(_systemService);
                int currentTimeCode;
                Times.Items.ForEach(x =>
                {
                    if (Int32.TryParse(x.timeCode, out currentTimeCode))
                    {
                        x.timeCodeString = timeCodeList.Where(y => y.key == Convert.ToInt32(x.timeCode)).Count() != 0 ? timeCodeList.Where(y => y.key == Convert.ToInt32(x.timeCode)).First().value : string.Empty;
                    }


                    x.statusString = FillApprovalStatus(x.status);
                });

                timeApprovalStore.DataSource = Times.Items;
                //////List<ActiveLeave> leaves = new List<ActiveLeave>();
                ////leaves.Add(new ActiveLeave() { destination = "dc", employeeId = 8, employeeName = new Model.Employees.Profile.EmployeeName() { fullName = "vima" }, endDate = DateTime.Now.AddDays(10) });


                timeApprovalStore.DataBind();
            }
            catch (Exception exp)
            {
                X.Msg.Alert(Resources.Common.Error, exp.Message).Show();
            }
        }
示例#23
0
        private void FillReport(bool throwException = true)
        {
            string rep_params        = vals.Text;
            ReportGenericRequest req = new ReportGenericRequest();

            req.paramString = rep_params;
            ListResponse <Model.Reports.RT803> resp = _reportsService.ChildGetAll <Model.Reports.RT803>(req);

            if (!resp.Success)
            {
                Common.ReportErrorMessage(resp, GetGlobalResourceObject("Errors", "Error_1").ToString(), GetGlobalResourceObject("Errors", "ErrorLogId").ToString());
            }
            Dictionary <string, string> parameters = Common.FetchReportParameters(texts.Text);
            UsersReport          h            = new UsersReport(parameters);
            List <XMLDictionary> userTypeList = Common.XMLDictionaryList(_systemService, "7");

            resp.Items.ForEach(x => x.userTypeName = userTypeList.Where(y => y.key == x.userType).Count() != 0 ? userTypeList.Where(y => y.key == x.userType).First().value : "");
            //  resp.Items.ForEach(x => x.DateString = x.eventDT.ToString(_systemService.SessionHelper.GetDateformat(), new CultureInfo("en"))); SignInTrail h = new SignInTrail();
            h.RightToLeft       = _systemService.SessionHelper.CheckIfArabicSession() ? DevExpress.XtraReports.UI.RightToLeft.Yes : DevExpress.XtraReports.UI.RightToLeft.No;
            h.RightToLeftLayout = _systemService.SessionHelper.CheckIfArabicSession() ? DevExpress.XtraReports.UI.RightToLeftLayout.Yes : DevExpress.XtraReports.UI.RightToLeftLayout.No;

            h.DataSource = resp.Items;
            //  string from = DateTime.Parse(req.Parameters["_fromDate"]).ToString(_systemService.SessionHelper.GetDateformat());
            //  string to = DateTime.Parse(req.Parameters["_toDate"]).ToString(_systemService.SessionHelper.GetDateformat());
            string user = _systemService.SessionHelper.GetCurrentUser();

            // h.Parameters["From"].Value = from;
            //  h.Parameters["To"].Value = to;
            h.Parameters["User"].Value = user;
            // h.Parameters["Filters"].Value = texts.Text;
            //if (resp.Items.Count > 0)
            //{
            //    //if (req.Parameters["_userId"] != "0")
            //    //    h.Parameters["UserId"].Value = resp.Items[0].userName;
            //    else
            //        h.Parameters["UserId"].Value = GetGlobalResourceObject("Common", "All");
            //}

            h.CreateDocument();
            ASPxWebDocumentViewer1.OpenReport(h);
            ASPxWebDocumentViewer1.DataBind();
        }
示例#24
0
        private void FillReport(bool throwException = true)
        {
            string rep_params        = vals.Text;
            ReportGenericRequest req = new ReportGenericRequest();

            req.paramString = rep_params;
            ListResponse <Model.Reports.RT104> resp = _reportsService.ChildGetAll <Model.Reports.RT104>(req);

            //if (resp == null || string.IsNullOrEmpty(resp.Error))
            //{
            //    throw new Exception(GetGlobalResourceObject("Errors", "Error_1").ToString());
            //}
            //if (!resp.Success)
            //{
            //    throw new Exception(resp.Error + "<br>" + GetGlobalResourceObject("Errors", "ErrorLogId") + resp.LogId + "</br>");

            //}

            if (!resp.Success)
            {
                Common.ReportErrorMessage(resp, GetGlobalResourceObject("Errors", "Error_1").ToString(), GetGlobalResourceObject("Errors", "ErrorLogId").ToString());
            }
            Dictionary <string, string> parameters = Web.UI.Forms.Common.FetchReportParameters(texts.Text);
            YearsInService y = new YearsInService(parameters);

            y.RightToLeft       = _systemService.SessionHelper.CheckIfArabicSession() ? DevExpress.XtraReports.UI.RightToLeft.Yes : DevExpress.XtraReports.UI.RightToLeft.No;
            y.RightToLeftLayout = _systemService.SessionHelper.CheckIfArabicSession() ? DevExpress.XtraReports.UI.RightToLeftLayout.Yes : DevExpress.XtraReports.UI.RightToLeftLayout.No;

            List <Model.Reports.RT104> reordered = resp.Items.Where(x => x.hiredMonth >= DateTime.Now.Month).ToList();

            reordered.AddRange(resp.Items.Where(x => x.hiredMonth < DateTime.Now.Month).OrderBy(h => h.hiredMonth).ToList());
            reordered.ForEach(x => x.HiredMonthString = GetGlobalResourceObject("Common", new CultureInfo("en-US").DateTimeFormat.GetMonthName(x.hiredMonth)).ToString());
            y.DataSource = reordered;
            string user = _systemService.SessionHelper.GetCurrentUser();

            y.Parameters["User"].Value = user;

            ASPxWebDocumentViewer1.DataBind();
            ASPxWebDocumentViewer1.OpenReport(y);
        }
示例#25
0
        protected void firstStore_ReadData(object sender, StoreReadDataEventArgs e)
        {
            string rep_params        = vals.Text;
            ReportGenericRequest req = new ReportGenericRequest();

            req.paramString = rep_params;
            ListResponse <Model.Reports.RT103> resp = _reportsService.ChildGetAll <Model.Reports.RT103>(req);

            resp.Items.ForEach(x =>
            {
                x.dateString = x.date.ToString(_systemService.SessionHelper.GetDateformat(), System.Threading.Thread.CurrentThread.CurrentUICulture);
            });
            if (!resp.Success)
            {
                X.MessageBox.ButtonText.Ok = Resources.Common.Ok;
                Common.errorMessage(resp);
                return;
            }

            firstStore.DataSource = resp.Items;
            firstStore.DataBind();
        }
示例#26
0
        private void FillReport(bool isInitial = false, bool throwException = true)
        {
            string rep_params        = vals.Text;
            ReportGenericRequest req = new ReportGenericRequest();

            req.paramString = rep_params;
            ListResponse <Model.Reports.RT506> resp = _reportsService.ChildGetAll <Model.Reports.RT506>(req);

            if (!resp.Success)
            {
                Common.ReportErrorMessage(resp, GetGlobalResourceObject("Errors", "Error_1").ToString(), GetGlobalResourceObject("Errors", "ErrorLogId").ToString());
            }


            Dictionary <string, string> parameters = Web.UI.Forms.Common.FetchReportParameters(texts.Text);
            PayrollPeriodSummary        h          = new PayrollPeriodSummary(parameters);

            h.DataSource = resp.Items;

            h.RightToLeft       = _systemService.SessionHelper.CheckIfArabicSession() ? DevExpress.XtraReports.UI.RightToLeft.Yes : DevExpress.XtraReports.UI.RightToLeft.No;
            h.RightToLeftLayout = _systemService.SessionHelper.CheckIfArabicSession() ? DevExpress.XtraReports.UI.RightToLeftLayout.Yes : DevExpress.XtraReports.UI.RightToLeftLayout.No;


            string user = _systemService.SessionHelper.GetCurrentUser();

            //if (resp.Items.Count != 0)
            //{
            //    h.Parameters["startDate"].Value = resp.Items[0].startDate.ToString(_systemService.SessionHelper.GetDateformat());
            //    h.Parameters["endDate"].Value = resp.Items[0].endDate.ToString(_systemService.SessionHelper.GetDateformat());
            //}
            h.Parameters["User"].Value = user;

            // h.Parameters["Fitlers"].Value = texts.Text;
            h.CreateDocument();


            ASPxWebDocumentViewer1.DataBind();
            ASPxWebDocumentViewer1.OpenReport(h);
        }
示例#27
0
        public void FillReport(bool throwException = true)
        {
            string rep_params        = vals.Text;
            ReportGenericRequest req = new ReportGenericRequest();

            req.paramString = rep_params;
            ListResponse <Model.Reports.RT105> resp = _reportsService.ChildGetAll <Model.Reports.RT105>(req);

            //if (resp == null || string.IsNullOrEmpty(resp.Error))
            //{
            //    throw new Exception(GetGlobalResourceObject("Errors", "Error_1").ToString());
            //}
            //if (!resp.Success)
            //{
            //    throw new Exception(resp.Error + "<br>" + GetGlobalResourceObject("Errors", "ErrorLogId") + resp.LogId + "</br>");
            //}

            if (!resp.Success)
            {
                Common.ReportErrorMessage(resp, GetGlobalResourceObject("Errors", "Error_1").ToString(), GetGlobalResourceObject("Errors", "ErrorLogId").ToString());
            }
            resp.Items.ForEach(x => x.DateString = x.date.ToString(_systemService.SessionHelper.GetDateformat()));
            Dictionary <string, string> parameters = Web.UI.Forms.Common.FetchReportParameters(texts.Text);

            JobHistory h = new JobHistory(parameters);

            h.RightToLeft       = _systemService.SessionHelper.CheckIfArabicSession() ? DevExpress.XtraReports.UI.RightToLeft.Yes : DevExpress.XtraReports.UI.RightToLeft.No;
            h.RightToLeftLayout = _systemService.SessionHelper.CheckIfArabicSession() ? DevExpress.XtraReports.UI.RightToLeftLayout.Yes : DevExpress.XtraReports.UI.RightToLeftLayout.No;

            h.Parameters["User"].Value = _systemService.SessionHelper.GetCurrentUser();
            h.DataSource = resp.Items;



            h.CreateDocument();
            ASPxWebDocumentViewer1.OpenReport(h);
            ASPxWebDocumentViewer1.DataBind();
        }
示例#28
0
        public void DisplayApprovals(string dayId, string employeeId, string shiftId, string code)
        {
            ReportGenericRequest req = new ReportGenericRequest();

            req.paramString = "1|" + employeeId + "^2|" + dayId + "^3|" + dayId + "^5|" + code;
            ListResponse <Time> resp = _timeAttendanceService.ChildGetAll <Time>(req);

            if (!resp.Success)
            {
                Common.errorMessage(resp);
                return;
            }
            timeCode = ConstTimeVariationType.TimeCodeList(_systemService);
            resp.Items.ForEach(x =>
            {
                x.timeCodeString = timeCode.Where(y => y.key == Convert.ToInt16(x.timeCode)).Count() != 0 ? timeCode.Where(y => y.key == Convert.ToInt32(x.timeCode)).First().value : string.Empty;

                x.statusString = FillApprovalStatus(x.status);
            });
            Store3.DataSource = resp.Items;
            Store3.DataBind();
            TimeApprovalWindow.Show();
        }
示例#29
0
        protected void ApprovalsStore_ReadData(object sender, StoreReadDataEventArgs e)
        {
            //AssetManagementPurchaseOrderApprovalListRequest req = new AssetManagementPurchaseOrderApprovalListRequest();
            //req.poId = currentPurchaseOrderId.Text;

            //if (string.IsNullOrEmpty(req.poId))
            //{
            //    ApprovalStore.DataSource = new List<AssetManagementPurchaseOrderApproval>();
            //    ApprovalStore.DataBind();
            //}
            //req.approverId = 0;
            //req.BranchId = "0";
            //req.DepartmentId = "0";

            //req.Status = 0;
            //req.Filter = "";



            ReportGenericRequest req = new ReportGenericRequest();

            req.paramString = "8|" + currentPurchaseOrderId.Text;

            ListResponse <AssetManagementPurchaseOrderApproval> response = _assetManagementService.ChildGetAll <AssetManagementPurchaseOrderApproval>(req);

            if (!response.Success)
            {
                Common.errorMessage(response);
                return;
            }
            response.Items.ForEach(x =>
            {
                x.statusString = Common.XMLDictionaryList(_systemService, "13").Where(y => y.key == (x.status != null ? Convert.ToInt32(x.status) : 0)).Count() != 0 ? Common.XMLDictionaryList(_systemService, "13").Where(y => y.key == (x.status != null ? Convert.ToInt32(x.status) : 0)).First().value : "";
            });
            ApprovalStore.DataSource = response.Items;
            ApprovalStore.DataBind();
        }
示例#30
0
        private void FillReport(bool isInitial = false, bool throwException = true)
        {
            string rep_params        = vals.Text;
            ReportGenericRequest req = new ReportGenericRequest();

            req.paramString = rep_params;


            ListResponse <Model.Reports.RT507> resp = _reportsService.ChildGetAll <Model.Reports.RT507>(req);

            if (!resp.Success)
            {
                Common.ReportErrorMessage(resp, GetGlobalResourceObject("Errors", "Error_1").ToString(), GetGlobalResourceObject("Errors", "ErrorLogId").ToString());
            }
            List <Model.Reports.RT501> Items = new List <Model.Reports.RT501>();

            Items.AddRange(resp.Items);
            Dictionary <string, string> parameters = Web.UI.Forms.Common.FetchReportParameters(texts.Text);
            EmployeesPaySlip            h          = new EmployeesPaySlip(Items, _systemService.SessionHelper.CheckIfArabicSession(), parameters);



            h.RightToLeft       = _systemService.SessionHelper.CheckIfArabicSession() ? DevExpress.XtraReports.UI.RightToLeft.Yes : DevExpress.XtraReports.UI.RightToLeft.No;
            h.RightToLeftLayout = _systemService.SessionHelper.CheckIfArabicSession() ? DevExpress.XtraReports.UI.RightToLeftLayout.Yes : DevExpress.XtraReports.UI.RightToLeftLayout.No;
            string user = _systemService.SessionHelper.GetCurrentUser();

            h.Parameters["user"].Value = user;
            //  h.Parameters["Fitlers"].Value = texts.Text;


            h.CreateDocument();


            ASPxWebDocumentViewer1.DataBind();
            ASPxWebDocumentViewer1.OpenReport(h);
        }