Exemple #1
0
        protected override void CreateNewObject()
        {
            report = new Report
            {
                ReportContent = NoiDungThucHien.Text,
                PerformOnDate = ThoiGianThucHien.Text.ToDateTime(),
                RequestID     = Parameters.Pid,
                Status        = TrangThai.SelectedValue.ToInteger(),
                ReporterName  = Sessions.DisplayName,
                DepartmentID  = Sessions.DepartmentID
            };

            if (!string.IsNullOrEmpty(VanBanDaBaoCao.SelectedValue.Trim()))
            {
                ExchangeDocServiceSoapClient client = new ExchangeDocServiceSoapClient();
                client.Endpoint.Address = new System.ServiceModel.EndpointAddress(AppSettings.HSCV_Service);
                var document = client.GetVBDiByIDs(new ArrayOfString {
                    VanBanDaBaoCao.SelectedValue.Trim()
                }).SingleOrDefault();

                ReportServices.Create(report: report, performIds: ThucHien.GetSelectedValues(), fileContent: document?.FileDinhKems?.FirstOrDefault()?.DuLieu, fileName: document?.FileDinhKems?.FirstOrDefault()?.TenFileDinhKem, uploadFolder: AppSettings.UploadFolder, isStaffReport: report.Request.CoQuyenXacNhan, isSendToProvince: true);
            }
            else
            {
                ReportServices.Create(report: report, performIds: ThucHien.GetSelectedValues(), fileContent: FileDinhKem.PostedFile, fileName: FileDinhKem.PostedFile?.FileName, uploadFolder: AppSettings.UploadFolder, isStaffReport: report.Request.CoQuyenXacNhan, isSendToProvince: true);
            }

            ExceptionlessClient.Default.SubmitEvent(new Event {
                Message = $"Nhập báo cáo thực hiện YKCD ({Sessions.DisplayName})", Type = "Nhập báo cáo", Source = AppSettings.AGENCY_NAME
            });

            Redirector.Redirect(ViewNames.Agency.ThongTinYKCD, "id", Parameters.Pid);
        }
Exemple #2
0
        protected override void CreateNewObject()
        {
            item = new Document();
            item.DocumentCategoryID = LoaiVanBan.SelectedValue.ToInteger();
            item.DocumentCode       = SoHieuVanBan.Text.Trim().ToUpper();

            if (VanBanNgoai.Checked)
            {
                item.SignerName = TenNguoiKy.Text;
            }
            else
            {
                item.SignerID   = NguoiKy.SelectedValue.ToInteger();
                item.SignerName = NguoiKy.SelectedItem.Text;
                item.WriterID   = NguoiSoanThao.SelectedValue.ToInteger();
            }

            item.ReleaseDate = NgayBanHanh.Text.ToDateTime();
            item.MainContent = TrichYeu.Text.Trim();
            item.VBDHCode    = Parameters.VbdhCode;
            DocumentServices.Create(item);

            DocumentFileServices.CreateDocumentFile(item, fileContent: FileDinhKem.PostedFile, fileName: FileDinhKem.PostedFile?.FileName, uploadFolder: AppSettings.UploadFolder);

            ExceptionlessClient.Default.SubmitEvent(new Event {
                Message = $"Nhập thông tin văn bản số {item.DocumentCode} ({Sessions.DisplayName})", Type = "Nhập văn bản", Source = AppSettings.AGENCY_NAME
            });

            Redirector.Redirect(ViewNames.SubAgency.YKCD_QuanLy, ParameterNames.Pid, item.DocumentID);
        }
Exemple #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Authenticator.CheckLoggedIn())
     {
         Redirector.Redirect(ViewNames.Public.DangNhap);
     }
 }
Exemple #4
0
        protected override void UpdateObject()
        {
            request = RequestServices.GetById(Parameters.Id);

            if (request != null)
            {
                if (request.RequiredDate != ThoiHan.Text.ToDateTime())
                {
                    Report report = new Report
                    {
                        RequestID     = request.RequestID,
                        CreatedByName = Sessions.DisplayName,
                        ReportContent = $"Cập nhật thời hạn thực hiện từ ngày {request.RequiredDate.ToDateString()} thành ngày {ThoiHan.Text}",
                        Status        = request.Status,
                        PerformOnDate = DateTime.Now
                    };

                    ReportServices.Create(report: report, performIds: null, fileContent: null, fileName: "", uploadFolder: AppSettings.UploadFolder, isStaffReport: true);
                }

                request.RequestContent = NoiDungChiDao.Text.Trim();
                request.RequiredDate   = ThoiHan.Text.ToDateTime();

                RequestServices.Update(request, ChuyenVienTheoDoi.GetSelectedValues(), DonViThucHien.GetSelectedValues());

                ExceptionlessClient.Default.SubmitEvent(new Event {
                    Message = $"Cập nhật thông tin ykcd ({Sessions.DisplayName})", Type = "Cập nhật YKCD", Source = "YKCD_UBND"
                });

                Redirector.Redirect(ViewNames.Province.ThongTinVanBan, "id", request.DocumentID);
            }
        }
Exemple #5
0
        protected override void CreateNewObject()
        {
            report = new Report
            {
                ReportContent = NoiDungThucHien.Text,
                PerformOnDate = ThoiGianThucHien.Text.ToDateTime(),
                RequestID     = Parameters.Pid,
                Status        = TrangThai.SelectedValue.ToInteger(),
                CreatedByName = Sessions.DisplayName,
                AgencyID      = Sessions.AgencyID
            };

            List <long> performIds = null;

            if (Authenticator.IsUser)
            {
                performIds = DonViThucHien.GetSelectedValues().ConvertAll(i => (long)i);
            }
            else if (Authenticator.IsAgency)
            {
                performIds = new List <long> {
                    RequestServices.GetById(Parameters.Pid).Performs.First(p => p.AgencyID == Sessions.AgencyID).PerformID
                };
            }

            ReportServices.Create(report: report, performIds: performIds, fileContent: FileDinhKem.PostedFile, fileName: FileDinhKem.PostedFile.FileName, uploadFolder: AppSettings.UploadFolder, isStaffReport: Authenticator.IsUser);
            ExceptionlessClient.Default.SubmitEvent(new Event {
                Message = $"Nhập báo cáo thực hiện YKCD ({Sessions.DisplayName})", Type = "Nhập báo cáo", Source = "YKCD_UBND"
            });
            Redirector.Redirect(ViewNames.Province.ThongTinYKCD, "id", Parameters.Pid);
        }
Exemple #6
0
        protected override void CreateNewObject()
        {
            item = new Document();
            item.DocumentCategoryID = LoaiVanBan.SelectedValue.ToInteger();
            item.DocumentCode       = SoHieuVanBan.Text.Trim().ToUpper();
            item.SignerID           = NguoiKy.SelectedValue.ToInteger();
            item.SignerName         = NguoiKy.SelectedItem.Text;
            item.WriterID           = NguoiSoanThao.SelectedValue.ToInteger();
            item.ReleaseDate        = NgayBanHanh.Text.ToDateTime();
            item.MainContent        = TrichYeu.Text.Trim();
            item.VBDHCode           = Parameters.VbdhCode;
            DocumentServices.Create(item);

            if (!string.IsNullOrEmpty(Parameters.VbdhCode))
            {
                var VBDi = ViewState["SyncDoc"] as VBDiDTO;

                foreach (FileDinhKemDTO file in VBDi.FileDinhKems)
                {
                    DocumentFileServices.CreateDocumentFile(item, file.DuLieu, file.TenFileDinhKem, AppSettings.UploadFolder);
                }
            }
            else
            {
                DocumentFileServices.CreateDocumentFile(item, fileContent: FileDinhKem.PostedFile, fileName: FileDinhKem.PostedFile.FileName, uploadFolder: AppSettings.UploadFolder);
            }

            ExceptionlessClient.Default.SubmitEvent(new Event {
                Message = $"Nhập thông tin văn bản số {item.DocumentCode} ({Sessions.DisplayName})", Type = "Nhập văn bản", Source = "YKCD_UBND"
            });

            Redirector.Redirect(ViewNames.Province.YKCD_QuanLy, ParameterNames.Pid, item.DocumentID);
        }
Exemple #7
0
        protected void btnSave_OnClick(object sender, EventArgs e)
        {
            var perform = PerformServices.GetById(Parameters.Id);

            if (perform != null)
            {
                var report = new Report
                {
                    RequestID     = perform.RequestID,
                    ReporterName  = Sessions.DisplayName,
                    ReportContent = BaoCaoThucHien.Text.Trim(),
                    Status        = TrangThai.SelectedValue.ToInteger(),
                    PerformOnDate = NgayHoanThanh.Text.ToDateTime(),
                    DepartmentID  = perform.DepartmentID
                };

                ReportServices.Create(report: report, performIds: new List <int> {
                    Parameters.Id
                }, fileContent: null, fileName: "", uploadFolder: AppSettings.UploadFolder, isStaffReport: true, isSendToAgency: true);

                ExceptionlessClient.Default.SubmitEvent(new Event {
                    Message = $"Chuyển trạng thái thực hiện của {perform.DepartmentName} thành {TrangThai.SelectedItem.Text.ToUpper()} ({Sessions.DisplayName})", Type = "Chuyển trạng thái YKCD", Source = AppSettings.AGENCY_NAME
                });

                Redirector.Redirect(ViewNames.SubAgency.ThongTinYKCD, "id", perform.RequestID);
            }
        }
Exemple #8
0
        protected override void UpdateObject()
        {
            item = (Document)ViewState["CurrentObject"];
            item.DocumentCategoryID = LoaiVanBan.SelectedValue.ToInteger();
            item.DocumentCode       = SoHieuVanBan.Text.Trim().ToUpper();

            if (VanBanNgoai.Checked)
            {
                item.SignerName = TenNguoiKy.Text;
            }
            else
            {
                item.SignerID   = NguoiKy.SelectedValue.ToInteger();
                item.SignerName = NguoiKy.SelectedItem.Text;
                item.WriterID   = NguoiSoanThao.SelectedValue.ToInteger();
            }

            item.ReleaseDate = NgayBanHanh.Text.ToDateTime();
            item.MainContent = TrichYeu.Text.Trim();
            DocumentServices.Update(item);

            DocumentFileServices.CreateDocumentFile(item, FileDinhKem.PostedFile, FileDinhKem.PostedFile?.FileName, AppSettings.UploadFolder);

            ExceptionlessClient.Default.SubmitEvent(new Event {
                Message = $"Cập nhật thông tin văn bản số {item.DocumentCode} ({Sessions.DisplayName})", Type = "Cập nhật văn bản", Source = AppSettings.AGENCY_NAME
            });

            Redirector.Redirect(ViewNames.Agency.VanBan_DanhSach);
        }
Exemple #9
0
 protected void Page_Load(object sender, EventArgs e)
 {
     Session.Abandon();
     Session.Clear();
     ClientSso.Ins.DangXuat();
     Redirector.Redirect(ViewNames.Public.ThongKe_NhomDonVi);
 }
Exemple #10
0
    //---------------------------------------------------------------------------
    /// <summary>
    /// The page Init event handler.
    /// </summary>
    protected override void OnInit(EventArgs e)
    {
        if (!this.IsCallback)
        {
            MainFrameHelpers.RegisterMainFrameScripts(this);
        }

        this.project = this.Request.QueryString["Project"];
        if (!string.IsNullOrEmpty(this.project))
        {
            ProjectBrowserMaint.SelectProjectByName(this.project);
        }

        string screenID = this.Request.QueryString["EditScreenID"];

        if (!string.IsNullOrEmpty(screenID))
        {
            ProjectBrowserMaint.ContextScreenID = screenID;
        }

        if (!PX.Common.PXContext.PXIdentity.AuthUser.IsInRole(PXAccess.GetCustomizerRole()))
        {
            Redirector.Redirect(System.Web.HttpContext.Current, string.Format("~/Frames/Error.aspx?exceptionID={0}&typeID={1}", "Access denied", "error"));
        }

        base.OnInit(e);
    }
Exemple #11
0
        protected override void CreateNewObject()
        {
            request = new Request
            {
                DocumentID     = Parameters.Pid,
                RequestContent = NoiDungChiDao.Text.Trim(),
                RequiredDate   = ThoiHan.Text.ToDateTime(),
                RequesterID    = LanhDaoYeuCau.SelectedValue.ToInteger(),
                RequesterName  = LanhDaoYeuCau.SelectedItem.Text
            };

            RequestServices.Create(request, ChuyenVienTheoDoi.GetSelectedValues(), DonViThucHien.GetSelectedValues(), NguoiThucHien.GetSelectedValues(), XacNhanHoanThanh.Checked);

            ExceptionlessClient.Default.SubmitEvent(new Event {
                Message = $"Nhập thông tin ykcd mới ({Sessions.DisplayName})", Type = "Nhập YKCD", Source = AppSettings.AGENCY_NAME
            });

            if (request.DocumentID > 0)
            {
                Redirector.Redirect(ViewNames.Agency.ThongTinVanBan, "id", request.DocumentID);
            }
            else
            {
                Redirector.Redirect(ViewNames.Agency.ThongTinYKCD, "id", request.RequestID);
            }
        }
Exemple #12
0
        protected override void UpdateObject()
        {
            request = RequestServices.GetById(Parameters.Id);

            if (request != null)
            {
                if (!request.IsProvinceRequest)
                {
                    request.RequestContent = NoiDungChiDao.Text.Trim();
                    request.RequiredDate   = ThoiHan.Text.ToDateTime();
                    request.RequesterName  = LanhDaoYeuCau.SelectedItem.Text;
                }

                request.RequesterID = LanhDaoYeuCau.SelectedValue.ToInteger();

                RequestServices.Update(request, ChuyenVienTheoDoi.GetSelectedValues(), DonViThucHien.GetSelectedValues(), NguoiThucHien.GetSelectedValues(), XacNhanHoanThanh.Checked);

                ExceptionlessClient.Default.SubmitEvent(new Event {
                    Message = $"Cập nhật thông tin ykcd ({Sessions.DisplayName})", Type = "Cập nhật YKCD", Source = AppSettings.AGENCY_NAME
                });

                if (request.DocumentID > 0)
                {
                    Redirector.Redirect(ViewNames.Agency.ThongTinVanBan, "id", request.DocumentID);
                }
                else
                {
                    Redirector.Redirect(ViewNames.Agency.ThongTinYKCD, "id", request.RequestID);
                }
            }
        }
Exemple #13
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Authenticator.ValidateSSO();

            if (!Authenticator.CheckRole(UserRole.Administrator))
            {
                Redirector.Redirect(ViewNames.Public.ThongKe_NhomDonVi);
            }
        }
        protected void btnPrintConsolidated_Click(object sender, EventArgs e)
        {
            string ResponseURL = string.Empty;

            ResponseURL  = "~/Reports/ReportForms/MonthlyConsolidatedReport.aspx?";
            ResponseURL += "&DateFrom=" + txtConsolidatedDateFrom.Text;
            ResponseURL += "&DateTo=" + txtConsolidatedDateTo.Text;
            Redirector.Redirect(ResponseURL);
        }
        public EmployeeActivitiesEntry()
        {
            //NO CRM Mode
            PXUIFieldAttribute.SetVisible <EPActivityApprove.contractID>(Activity.Cache, null, !PXAccess.FeatureInstalled <FeaturesSet.customerModule>());
            PXUIFieldAttribute.SetVisible <ContractEx.contractCD>(dummyContract.Cache, null, PXAccess.FeatureInstalled <FeaturesSet.customerModule>());

            if (!PXAccess.FeatureInstalled <FeaturesSet.timeReportingModule>())
            {
                PXUIFieldAttribute.SetVisible(Activity.Cache, typeof(EPActivityApprove.timeSpent).Name, false);
                PXUIFieldAttribute.SetVisible(Activity.Cache, typeof(EPActivityApprove.timeBillable).Name, false);
                PXUIFieldAttribute.SetVisible(Activity.Cache, typeof(EPActivityApprove.isBillable).Name, false);

                PXUIFieldAttribute.SetVisible <PMTimeActivityFilter.regularOvertime>(Filter.Cache, null, false);
                PXUIFieldAttribute.SetVisible <PMTimeActivityFilter.regularTime>(Filter.Cache, null, false);
                PXUIFieldAttribute.SetVisible <PMTimeActivityFilter.regularTotal>(Filter.Cache, null, false);
                PXUIFieldAttribute.SetVisible <PMTimeActivityFilter.billableOvertime>(Filter.Cache, null, false);
                PXUIFieldAttribute.SetVisible <PMTimeActivityFilter.billableTime>(Filter.Cache, null, false);
                PXUIFieldAttribute.SetVisible <PMTimeActivityFilter.billableTotal>(Filter.Cache, null, false);
            }
            bool contractInstalled = PXAccess.FeatureInstalled <CS.FeaturesSet.contractManagement>();

            if (!contractInstalled)
            {
                PXUIFieldAttribute.SetVisible <Contract.contractCD>(Caches[typeof(Contract)], null, false);
            }
            if (!PXAccess.FeatureInstalled <FeaturesSet.projectModule>())
            {
                PXUIFieldAttribute.SetVisible(Activity.Cache, typeof(EPActivityApprove.projectTaskID).Name, false);
                PXUIFieldAttribute.SetVisible <PMTimeActivityFilter.projectTaskID>(Filter.Cache, null, false);
                PXUIFieldAttribute.SetVisible <PMTimeActivityFilter.includeReject>(Filter.Cache, null, false);
                PXUIFieldAttribute.SetVisible <EPActivityApprove.approvalStatus>(Activity.Cache, null, false);
                PXUIFieldAttribute.SetVisible <EPActivityApprove.approverID>(Activity.Cache, null, false);
            }


            EPActivityType activityType = (EPActivityType)PXSelect <EPActivityType> .Search <EPActivityType.type>(this, EPsetingst.Current.DefaultActivityType);

            if (activityType == null || activityType.RequireTimeByDefault != true)
            {
                throw new PXSetupNotEnteredException(Messages.SetupNotEntered, typeof(EPActivityType), Messages.ActivityType);
            }
            this.FieldUpdating.AddHandler(typeof(EPActivityApprove), "Date_Date", StartDateFieldUpdating);

            EPEmployee employeeByUserID = PXSelect <EPEmployee, Where <EP.EPEmployee.userID, Equal <Current <AccessInfo.userID> > > > .Select(this);

            if (employeeByUserID == null)
            {
                if (IsExport || IsImport)
                {
                    throw new PXException(Messages.MustBeEmployee);
                }
                else
                {
                    Redirector.Redirect(System.Web.HttpContext.Current, string.Format("~/Frames/Error.aspx?exceptionID={0}&typeID={1}", Messages.MustBeEmployee, "error"));
                }
            }
        }
Exemple #16
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Authenticator.ValidateSSO();

            if (!Authenticator.CheckLoggedIn())
            {
                Redirector.Redirect(ViewNames.Public.ThongKe_NhomDonVi);
            }
        }
Exemple #17
0
        protected void DangNhap_OnClick(object sender, EventArgs e)
        {
            if (IsSSO.Checked)
            {
                if (Authenticator.ValidateSSO(TenDangNhap.Text, MatKhau.Text))
                {
                    if (Authenticator.CheckRole(UserRole.Administrator))
                    {
                        Redirector.Redirect(ViewNames.Admin.NguoiSuDung_DanhSach);
                    }
                    else
                    {
                        Redirector.Redirect(ViewNames.Agency.BangThongKe);
                    }

                    ExceptionlessClient.Default.SubmitEvent(new Event {
                        Message = $"Đăng nhập SSO thành công ({Sessions.DisplayName})", Type = "Login", Source = AppSettings.AGENCY_NAME
                    });
                }
                else
                {
                    lblMessage.Text = "Tên đăng nhập hay mật khẩu không chính xác";

                    ExceptionlessClient.Default.SubmitEvent(new Event {
                        Message = $"Đăng nhập không thành công", Type = "Login", Source = AppSettings.AGENCY_NAME
                    });
                }
            }
            else
            {
                if (Authenticator.ValidateUser(TenDangNhap.Text, MatKhau.Text) ||
                    Authenticator.ValidateDepartment(TenDangNhap.Text, MatKhau.Text))
                {
                    if (Authenticator.CheckRole(UserRole.Administrator))
                    {
                        Redirector.Redirect(ViewNames.Admin.NguoiSuDung_DanhSach);
                    }
                    else
                    {
                        Redirector.Redirect(ViewNames.Agency.BangThongKe);
                    }

                    ExceptionlessClient.Default.SubmitEvent(new Event {
                        Message = $"Đăng nhập thành công ({Sessions.DisplayName})", Type = "Login", Source = AppSettings.AGENCY_NAME
                    });
                }
                else
                {
                    lblMessage.Text = "Tên đăng nhập hay mật khẩu không chính xác";

                    ExceptionlessClient.Default.SubmitEvent(new Event {
                        Message = $"Đăng nhập không thành công", Type = "Login", Source = AppSettings.AGENCY_NAME
                    });
                }
            }
        }
Exemple #18
0
        protected void DangNhap_OnClick(object sender, EventArgs e)
        {
            if (IsSSO.Checked)
            {
                if (Authenticator.ValidateSSO(TenDangNhap.Text, MatKhau.Text))
                {
                    if (Authenticator.CheckRole(UserRole.Administrator))
                    {
                        Redirector.Redirect(ViewNames.Admin.NguoiSuDung_DanhSach);
                    }
                    else
                    {
                        Redirector.Redirect(ViewNames.Province.BangThongKe);
                    }

                    ExceptionlessClient.Default.SubmitEvent(new Event {
                        Message = $"Đăng nhập SSO thành công ({TenDangNhap.Text})", Type = "Login", Source = "YKCD_UBND"
                    });
                }
                else
                {
                    lblMessage.Text = "Tên đăng nhập hay mật khẩu không chính xác";

                    ExceptionlessClient.Default.SubmitEvent(new Event {
                        Message = $"Đăng nhập SSO thất bại ({TenDangNhap.Text})", Type = "Login", Source = "YKCD_UBND"
                    });
                }
            }
            else
            {
                if (Authenticator.ValidateUser(TenDangNhap.Text, MatKhau.Text) ||
                    Authenticator.ValidateAgency(TenDangNhap.Text, MatKhau.Text))
                {
                    if (Authenticator.CheckRole(UserRole.Administrator))
                    {
                        Redirector.Redirect(ViewNames.Admin.NguoiSuDung_DanhSach);
                    }
                    else
                    {
                        Redirector.Redirect(ViewNames.Province.BangThongKe);
                    }

                    ExceptionlessClient.Default.SubmitEvent(new Event {
                        Message = $"Đăng nhập thành công ({TenDangNhap.Text})", Type = "Login", Source = "YKCD_UBND"
                    });
                }
                else
                {
                    lblMessage.Text = "Tên đăng nhập hay mật khẩu không chính xác";

                    ExceptionlessClient.Default.SubmitEvent(new Event {
                        Message = $"Đăng nhập thất bại ({TenDangNhap.Text})", Type = "Login", Source = "YKCD_UBND"
                    });
                }
            }
        }
Exemple #19
0
 protected void btnBack_Click(object sender, EventArgs e)
 {
     Session.Remove("BRAND_NAME");
     Session.Remove("TRANSIT_STATUS");
     Session.Remove("INCLUDE_DATE_RANGE");
     Session.Remove("OUTLET_NAME");
     Session.Remove("DR_DATE_FROM");
     Session.Remove("DR_DATE_TO");
     Redirector.Redirect("~/Accounting/DeliveryReceiptConfirmationPanel.aspx");
 }
        protected void btnGenerateDetailedReportPerCustomer_Click(object sender, EventArgs e)
        {
            string ResponseURL = string.Empty;

            ResponseURL  = "~/Reports/ReportForms/DetailedReportPerOutlet.aspx?";
            ResponseURL += "CustomerNumber=" + dlOutletDetailed.SelectedValue;
            ResponseURL += "&DateFrom=" + txtPullOutDetailedPerOutletDateFrom.Text;
            ResponseURL += "&DateTo=" + txtPullOutDetailedPerOutletDateTo.Text;
            Redirector.Redirect(ResponseURL);
        }
        protected void btnGenerateMonthlyPullOutSummaryPerCustomer_Click(object sender, EventArgs e)
        {
            string ResponseURL = string.Empty;

            ResponseURL  = "~/Reports/ReportForms/MonthlyPullOutSummaryPerCustomer.aspx?";
            ResponseURL += "CustomerNumber=" + dlCustomerSummary.SelectedValue;
            ResponseURL += "&DateFrom=" + txtDateRangeFromSummaryPerCustomer.Text;
            ResponseURL += "&DateTo=" + txtDateRangeToSummaryPerCustomer.Text;
            Redirector.Redirect(ResponseURL);
        }
Exemple #22
0
 protected void btnPrint_Click(object sender, EventArgs e)
 {
     try
     {
         RECORD_NUMBER = long.Parse(gvSOI.SelectedRow.Cells[2].Text);
     }
     catch (Exception)
     {
         Redirector.Redirect("~/Accounting/SOIPanel.aspx");
     }
 }
 protected void btnPrintByBrand_Click(object sender, EventArgs e)
 {
     ClearSessionVariables();
     if (dlConfirmedBrands.SelectedValue == "ALL")
     {
         Session.Add("BRAND_NAME", "ALL");
         Session.Add("TRANSIT_STATUS", "Confirmed");
         Session.Add("OUTLET_NAME", "");
         if (chkConfirmedDREnableDateRange.Checked == true)
         {
             Session.Add("INCLUDE_DATE_RANGE", "TRUE");
             if (txtConfirmedDateRangeTo.Text != string.Empty || txtConfirmedDateRangeFrom.Text != string.Empty)
             {
                 Session.Add("DR_DATE_FROM", DateTime.Parse(txtConfirmedDateRangeFrom.Text));
                 Session.Add("DR_DATE_TO", DateTime.Parse(txtConfirmedDateRangeTo.Text));
                 Redirector.Redirect("~/Reports/ReportForms/DeliveryReceiptConfirmationReport.aspx");
             }
             else
             {
                 Redirector.Redirect("~/Accounting/DeliveryReceiptConfirmationPanel.aspx");
             }
         }
         else
         {
             Session.Add("INCLUDE_DATE_RANGE", "FALSE");
             Redirector.Redirect("~/Reports/ReportForms/DeliveryReceiptConfirmationReport.aspx");
         }
     }
     else
     {
         Session.Add("BRAND_NAME", dlConfirmedBrands.SelectedValue);
         Session.Add("TRANSIT_STATUS", "Confirmed");
         Session.Add("OUTLET_NAME", "");
         if (chkConfirmedDREnableDateRange.Checked == true)
         {
             Session.Add("INCLUDE_DATE_RANGE", "TRUE");
             if (txtConfirmedDateRangeTo.Text != string.Empty || txtConfirmedDateRangeFrom.Text != string.Empty)
             {
                 Session.Add("DR_DATE_FROM", DateTime.Parse(txtConfirmedDateRangeFrom.Text));
                 Session.Add("DR_DATE_TO", DateTime.Parse(txtConfirmedDateRangeTo.Text));
                 Redirector.Redirect("~/Reports/ReportForms/DeliveryReceiptConfirmationReport.aspx");
             }
             else
             {
                 Redirector.Redirect("~/Accounting/DeliveryReceiptConfirmationPanel.aspx");
             }
         }
         else
         {
             Session.Add("INCLUDE_DATE_RANGE", "FALSE");
             Redirector.Redirect("~/Reports/ReportForms/DeliveryReceiptConfirmationReport.aspx");
         }
     }
 }
        protected void btnPrintByBrand_Click(object sender, EventArgs e)
        {
            string ResponseURL = string.Empty;

            ResponseURL  = "~/Reports/ReportForms/MonthlyPullOutSummaryPerBrandReport.aspx?";
            ResponseURL += "Brand=" + dlConfirmedBrands.SelectedValue;
            ResponseURL += "&DateFrom=" + txtConfirmedDateRangeFrom.Text;
            ResponseURL += "&DateTo=" + txtConfirmedDateRangeTo.Text;
            ResponseURL += "&CustomerType=" + rdioListCustomerType.SelectedValue;
            Redirector.Redirect(ResponseURL);
        }
        protected void TransactionGridViewCustomCallback(object sender, ReportGridViewCustomCallbackEventArgs e)
        {
            CallbackParameter   parameter   = CallbackParameter.Parse(e.Parameters);
            ArchivedTransaction transaction = (ArchivedTransaction)TransactionGridView.GetRow(parameter.RowIndex);

            var redirectionParameter = new RedirectionParameter(parameter.FieldName, SessionWrapper.Instance.Get.ClientFromQueryString.Id, SessionWrapper.Instance.Get.CustomerFromQueryString.Id, transaction.Batch);

            ISecurityManager securityManager = SecurityManagerFactory.Create(Context.User as CffPrincipal, SessionWrapper.Instance.Get.Scope);
            Redirector       redirector      = new Redirector(RedirectionService.Create(this, securityManager));

            redirector.Redirect(redirectionParameter);
        }
        protected override void UpdateObject()
        {
            Metting metting = MettingServices.GetById(IntId);

            if (metting != null)
            {
                metting.DocumentID = VanBan.SelectedValue.ToInteger();
                MettingServices.Update(metting);
            }

            Redirector.Redirect(ViewNames.Province.DanhSachCuocHop);
        }
Exemple #27
0
 protected void btnPreviewInHtml_Click(object sender, EventArgs e)
 {
     try
     {
         Image imgSOI = (Image)gvSOI.SelectedRow.FindControl("imgSOI");
         RECORD_NUMBER = long.Parse(imgSOI.AlternateText);
     }
     catch (Exception)
     {
         Redirector.Redirect("~/Accounting/SOIPanel.aspx");
     }
 }
Exemple #28
0
        protected void ReportGridViewCustomCallback(object sender, ASPxGridViewCustomCallbackEventArgs e)
        {
            CallbackParameter        parameter            = CallbackParameter.Parse(e.Parameters);
            AgedBalancesReportRecord record               = (AgedBalancesReportRecord)reportGridView.GetRow(parameter.RowIndex);
            RedirectionParameter     redirectionParameter = new RedirectionParameter(parameter.FieldName,
                                                                                     record.ClientNumber, record.Id);

            ISecurityManager securityManager = SecurityManagerFactory.Create(Context.User as CffPrincipal, SessionWrapper.Instance.Scope);
            Redirector       redirector      = new Redirector(RedirectionService.Create(this, securityManager));

            redirector.Redirect(redirectionParameter);
        }
Exemple #29
0
        protected void Page_Init(object sender, EventArgs e)
        {
            #region check roles
            Permission.PERMITTED_USER = (UsersClass)Session["USER_ACCOUNT"];
            Permission.ROLES          = (List <UserRole>)Session["USER_ROLES"];
            if (Permission.CanInsert() == false)
            {
                Redirector.Redirect("~/Accounting/MonthlySOIPanel.aspx");
            }

            #endregion
            InitializeBrandList();
        }
Exemple #30
0
        /// <summary>
        /// Processes this response
        /// </summary>
        /// <returns></returns>
        public override Task <ControllerResponseResult> Process()
        {
            if (!string.IsNullOrEmpty(Url))
            {
                Redirector.Redirect(Url);
            }
            else
            {
                Redirector.Redirect(RedirectionType, BookmarkName);
            }

            return(Task.FromResult(ControllerResponseResult.Redirect));
        }