Example #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                VerificationUtility ver = new VerificationUtility();
                ver.JudgeOperate(this.Page, 52, new List<OperateEnum>() { OperateEnum.录入 });

                string redirectUrl = "PayApplyList.aspx";

                this.navigation1.Routes.Add("付款申请列表", redirectUrl);
                this.navigation1.Routes.Add("付款申请合约列表", "PayApplyContractList.aspx");
                this.navigation1.Routes.Add("付款申请新增", string.Empty);

                int subId = 0;
                if (string.IsNullOrEmpty(Request.QueryString["id"]) || !int.TryParse(Request.QueryString["id"], out subId))
                    Response.Redirect(redirectUrl);

                UserModel user = UserUtility.CurrentUser;
                this.curUser = user;

                //子合约
                ContractSubBLL subBll = new ContractSubBLL();
                ResultModel result = subBll.Get(user, subId);
                if (result.ResultStatus != 0)
                    Response.Redirect(redirectUrl);
                ContractSub sub = result.ReturnValue as ContractSub;
                if (sub == null || sub.ContractId == 0)
                    Response.Redirect(redirectUrl);

                this.curSub = sub;

                //合约
                ContractBLL bll = new ContractBLL();
                result = bll.Get(user, sub.ContractId);
                if (result.ResultStatus != 0)
                    Response.Redirect(redirectUrl);

                NFMT.Contract.Model.Contract contract = result.ReturnValue as NFMT.Contract.Model.Contract;
                if (contract == null || contract.ContractId == 0)
                    Response.Redirect(redirectUrl);

                this.contractExpander1.CurContract = contract;
                this.contractExpander1.CurContractSub = sub;
                this.contractExpander1.RedirectUrl = redirectUrl;

                //局域变量赋值
                this.PayMatterStyle = (int)StyleEnum.付款事项;
                this.PayModeStyle = (int)StyleEnum.PayMode;

                PayApplyBLL payApplyBLL = new PayApplyBLL();
                result = payApplyBLL.GetContractBalancePayment(user, sub.SubId, 0);
                if (result.ResultStatus != 0)
                    Response.Redirect(redirectUrl);

                BalancePaymentValue = (decimal)result.ReturnValue;
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                VerificationUtility ver = new VerificationUtility();
                ver.JudgeOperate(this.Page, 52, new List<OperateEnum>() { OperateEnum.查询 });

                this.navigation1.Routes.Add("付款申请列表", "PayApplyList.aspx");
                this.navigation1.Routes.Add("付款申请合约列表", string.Empty);
            }
        }
Example #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            UserModel user = UserUtility.CurrentUser;
            string directUrl = string.Format("{0}User/CorporationList.aspx", DefaultValue.NftmSiteName);

            if (!IsPostBack)
            {
                VerificationUtility ver = new VerificationUtility();
                ver.JudgeOperate(Page, 16, new List<OperateEnum>() { OperateEnum.冻结, OperateEnum.解除冻结 });

                navigation1.Routes.Add("企业管理", directUrl);
                navigation1.Routes.Add("企业明细", string.Empty);

                if (string.IsNullOrEmpty(Request.QueryString["id"]))
                    Response.Redirect(directUrl);

                if (!int.TryParse(Request.QueryString["id"], out id) || id == 0)
                    Response.Redirect(directUrl);

                CorporationBLL corpBLL = new CorporationBLL();
                var result = corpBLL.Get(user, id);
                if (result.ResultStatus != 0)
                    Response.Redirect(directUrl);

                Corporation corporation = result.ReturnValue as Corporation;
                if (corporation != null)
                {
                    Bloc bloc = UserProvider.Blocs.SingleOrDefault(a => a.BlocId == corporation.ParentId);
                    if (bloc != null)
                        ddlBlocId.InnerText = bloc.BlocName;
                    txbCorpCode.InnerText = corporation.CorpCode;
                    txbCorpName.InnerText = corporation.CorpName;
                    txbCorpEName.InnerText = corporation.CorpEName;
                    txbTaxPlayer.InnerText = corporation.TaxPayerId;
                    txbCorpFName.InnerText = corporation.CorpFullName;
                    txbCorpFEName.InnerText = corporation.CorpFullEName;
                    txbCorpAddress.InnerText = corporation.CorpAddress;
                    txbCorpEAddress.InnerText = corporation.CorpEAddress;
                    txbCorpTel.InnerText = corporation.CorpTel;
                    txbCorpFax.InnerText = corporation.CorpFax;
                    txbCorpZip.InnerText = corporation.CorpZip;
                    BDStyleDetail bd = DetailProvider.Details(StyleEnum.CorpType)[corporation.CorpType];
                    if (bd != null)
                        ddlCorpType.InnerText = bd.DetailName;

                    hidId.Value = corporation.CorpId.ToString();

                    JavaScriptSerializer serializer = new JavaScriptSerializer();
                    string json = serializer.Serialize(corporation);
                    hidModel.Value = json;
                }
            }
        }
Example #4
0
        //public string stockJson = string.Empty;
        protected void Page_Load(object sender, EventArgs e)
        {
            UserModel user = UserUtility.CurrentUser;
            ResultModel result = new ResultModel();
            string redirectUrl = string.Format("{0}WareHouse/PreToRealList.aspx", DefaultValue.NftmSiteName);

            this.hidBDStyleId.Value = ((int)StyleEnum.报关状态).ToString();

            if (!IsPostBack)
            {
                VerificationUtility ver = new VerificationUtility();
                ver.JudgeOperate(this.Page, 129, new List<OperateEnum>() { OperateEnum.录入 });

                this.navigation1.Routes.Add("预入库转正式库存列表", redirectUrl);
                this.navigation1.Routes.Add("预入库转正式库存新增", string.Empty);

                int stockId = 0;
                if (string.IsNullOrEmpty(Request.QueryString["id"]) || !int.TryParse(Request.QueryString["id"], out stockId) || stockId <= 0)
                    Response.Redirect(redirectUrl);

                StockBLL stockBLL = new StockBLL();
                result = stockBLL.Get(user, stockId);
                if (result.ResultStatus != 0)
                    Response.Redirect(redirectUrl);

                stock = result.ReturnValue as Stock;
                if (stock == null)
                    Response.Redirect(redirectUrl);

                StockNameBLL stockNameBLL = new StockNameBLL();
                result = stockNameBLL.Get(user, stock.StockNameId);
                if (result.ResultStatus != 0)
                    Response.Redirect(redirectUrl);

                stockName = result.ReturnValue as StockName;
                if (stockName == null)
                    Response.Redirect(redirectUrl);

                //this.spStockStatus.InnerText = ((NFMT.WareHouse.StockStatusEnum)stock.StockStatus).ToString();

                //System.Web.Script.Serialization.JavaScriptSerializer serializer = new System.Web.Script.Serialization.JavaScriptSerializer();
                //this.stockJson = serializer.Serialize(stock);
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                VerificationUtility ver = new VerificationUtility();
                ver.JudgeOperate(this.Page, 52, new List<OperateEnum>() { OperateEnum.录入 });

                string redirectUrl = "PayApplyMulityContractList.aspx";

                this.navigation1.Routes.Add("付款申请列表", "PayApplyList.aspx");
                this.navigation1.Routes.Add("付款申请合约列表", redirectUrl);
                this.navigation1.Routes.Add("付款申请新增", string.Empty);

                if (string.IsNullOrEmpty(Request.QueryString["outCorpId"]) ||
                    !int.TryParse(Request.QueryString["outCorpId"], out outCorpId) || outCorpId <= 0)
                    this.WarmAlert("参数错误", redirectUrl);

                subIds = Request.QueryString["subIds"];
                if (string.IsNullOrEmpty(subIds))
                    this.WarmAlert("参数错误", redirectUrl);

                UserModel user = UserUtility.CurrentUser;
                ResultModel result = new ResultModel();
                this.curUser = user;
                applyCorpId = user.CorpId;

                foreach (string subId in subIds.Split(','))
                {
                    PayApplyBLL payApplyBLL = new PayApplyBLL();
                    result = payApplyBLL.GetContractBalancePayment(user, Convert.ToInt32(subId), 0);
                    if (result.ResultStatus != 0)
                        this.WarmAlert(result.Message, redirectUrl);

                    BalancePaymentValue += (decimal)result.ReturnValue;
                }
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                VerificationUtility ver = new VerificationUtility();
                ver.JudgeOperate(this.Page, 117, new List<OperateEnum>() { OperateEnum.提交审核, OperateEnum.作废, OperateEnum.撤返, OperateEnum.执行完成, OperateEnum.执行完成撤销 });

                this.navigation1.Routes.Add("财务发票列表", "FinanceInvoiceList.aspx");
                this.navigation1.Routes.Add("财务发票明细", string.Empty);
                UserModel user = UserUtility.CurrentUser;
                ResultModel result = new ResultModel();

                int invoiceId = 0;
                if (string.IsNullOrEmpty(Request.QueryString["iid"]) || !int.TryParse(Request.QueryString["iid"], out invoiceId))
                    invoiceId = 0;

                int fundsInvoiceId = 0;
                if (invoiceId == 0 && (string.IsNullOrEmpty(Request.QueryString["id"]) || !int.TryParse(Request.QueryString["id"], out fundsInvoiceId)))
                    Response.Redirect("FinanceInvoiceList.aspx");

                //获取财务发票
                FinanceInvoiceBLL financeInvoiceBLL = new FinanceInvoiceBLL();
                if (invoiceId > 0)
                    result = financeInvoiceBLL.GetByInvoiceId(user, invoiceId);
                else
                    result = financeInvoiceBLL.Get(user, fundsInvoiceId);
                if (result.ResultStatus != 0)
                    Response.Redirect("FinanceInvoiceList.aspx");
                FinanceInvoice fundsInvoice = result.ReturnValue as FinanceInvoice;
                if (fundsInvoice == null || fundsInvoice.FinanceInvoiceId <= 0)
                    Response.Redirect("FinanceInvoiceList.aspx");

                this.curFundsInvoice = fundsInvoice;

                //获取主发票信息
                InvoiceBLL invoiceBLL = new InvoiceBLL();
                result = invoiceBLL.Get(user, fundsInvoice.InvoiceId);
                if (result.ResultStatus != 0)
                    Response.Redirect("FinanceInvoiceList.aspx");
                NFMT.Operate.Model.Invoice invoice = result.ReturnValue as NFMT.Operate.Model.Invoice;
                if (invoice == null || invoice.InvoiceId <= 0)
                    Response.Redirect("FinanceInvoiceList.aspx");

                this.curInvoice = invoice;

                FinBusInvAllotDetailBLL finBusInvAllotDetailBLL = new FinBusInvAllotDetailBLL();
                result = finBusInvAllotDetailBLL.GetBIds(user, fundsInvoice.FinanceInvoiceId);
                if (result.ResultStatus != 0)
                    Response.Redirect("FinanceInvoiceList.aspx");

                this.hidsids.Value = result.ReturnValue.ToString();

                string dirStr = "开出";
                if (invoice.InvoiceDirection == 34)
                {
                    dirStr = "收入";
                    outSelf = 0;
                    inSelf = 1;
                }
                invoiceDirection = invoice.InvoiceDirection;
                //title init
                this.titInvDate.InnerHtml = string.Format("{0}日期:", dirStr);

                JavaScriptSerializer serializer = new JavaScriptSerializer();
                string json = serializer.Serialize(invoice);
                this.hidModel.Value = json;

                //attach
                this.attach1.BusinessIdValue = this.curInvoice.InvoiceId;
            }
        }
Example #7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            VerificationUtility ver = new VerificationUtility();
            ver.JudgeOperate(this.Page, 52, new List<OperateEnum>() { OperateEnum.修改 });

            if (!IsPostBack)
            {
                UserModel user = UserUtility.CurrentUser;
                this.curUser = user;

                this.PayMatterStyle = (int)StyleEnum.付款事项;
                this.PayModeStyle = (int)StyleEnum.PayMode;

                string redirectUrl = "PayApplyList.aspx";

                this.navigation1.Routes.Add("付款申请列表", redirectUrl);
                this.navigation1.Routes.Add("付款申请明细", string.Empty);

                int applyId = 0, payApplyId = 0;
                if (!string.IsNullOrEmpty(Request.QueryString["aid"]))
                    int.TryParse(Request.QueryString["aid"], out applyId);
                if (applyId <= 0 && (string.IsNullOrEmpty(Request.QueryString["id"]) || !int.TryParse(Request.QueryString["id"], out payApplyId)))
                    this.WarmAlert("付款申请序号错误", redirectUrl);

                ResultModel result = new ResultModel();

                //获取付款申请
                PayApplyBLL payApplyBLL = new PayApplyBLL();
                if (applyId > 0)
                    result = payApplyBLL.GetByApplyId(user, applyId);
                else
                    result = payApplyBLL.Get(user, payApplyId);

                if (result.ResultStatus != 0)
                    this.WarmAlert("获取付款申请失败", redirectUrl);

                PayApply payApply = result.ReturnValue as PayApply;
                if (payApply == null || payApply.PayApplyId <= 0)
                    this.WarmAlert("获取付款申请失败", redirectUrl);

                this.curPayApply = payApply;

                //获取主申请
                ApplyBLL applyBLL = new ApplyBLL();
                result = applyBLL.Get(user, payApply.ApplyId);
                if (result.ResultStatus != 0)
                    this.WarmAlert("获取主申请失败", redirectUrl);

                Apply apply = result.ReturnValue as Apply;
                if (apply == null || apply.ApplyId <= 0)
                    this.WarmAlert("获取主申请失败", redirectUrl);

                this.curApply = apply;

                //获取合约付款申请
                ContractPayApplyBLL contractPayApplyBLL = new ContractPayApplyBLL();
                result = contractPayApplyBLL.GetByPayApplyId(user, payApply.PayApplyId);
                if (result.ResultStatus != 0)
                    this.WarmAlert("获取合约失败", redirectUrl);

                ContractPayApply contractPayApply = result.ReturnValue as ContractPayApply;
                if (contractPayApply == null || contractPayApply.RefId <= 0)
                    this.WarmAlert("获取合约失败", redirectUrl);

                //获取子合约
                ContractSubBLL subBll = new ContractSubBLL();
                result = subBll.Get(user, contractPayApply.ContractSubId);
                if (result.ResultStatus != 0)
                    this.WarmAlert("获取子合约失败", redirectUrl);
                ContractSub sub = result.ReturnValue as ContractSub;
                if (sub == null || sub.ContractId == 0)
                    this.WarmAlert("获取子合约失败", redirectUrl);

                this.curSub = sub;

                //合约
                ContractBLL bll = new ContractBLL();
                result = bll.Get(user, sub.ContractId);
                if (result.ResultStatus != 0)
                    this.WarmAlert("获取合约失败", redirectUrl);

                NFMT.Contract.Model.Contract contract = result.ReturnValue as NFMT.Contract.Model.Contract;
                if (contract == null || contract.ContractId == 0)
                    this.WarmAlert("获取合约失败", redirectUrl);

                this.contractExpander1.CurContract = contract;
                this.contractExpander1.CurContractSub = sub;
                this.contractExpander1.RedirectUrl = redirectUrl;

                SelectModel select = payApplyBLL.GetPayApplyStocksSelect(1, 100, "spa.RefId desc", payApply.PayApplyId);
                result = payApplyBLL.Load(user, select, DefaultValue.ClearAuth);
                if (result.ResultStatus != 0)
                    this.WarmAlert("获取付款库存列表失败", redirectUrl);

                DataTable dt = result.ReturnValue as DataTable;
                if (dt == null)
                    this.WarmAlert("获取付款库存列表失败", redirectUrl);

                this.StockDetailsJson = JsonConvert.SerializeObject(dt, new DataTableConverter());

                //付款明细
                PaymentBLL paymentBLL = new PaymentBLL();
                select = paymentBLL.GetSelectModel(1, 100, "pay.PaymentId desc", DefaultValue.DefaultTime, DefaultValue.DefaultTime, 0, 0, (int)StatusEnum.已生效, payApply.PayApplyId);
                result = paymentBLL.Load(user, select, DefaultValue.ClearAuth);
                if (result.ResultStatus != 0)
                    this.WarmAlert("获取付款明细失败", redirectUrl);

                dt = result.ReturnValue as DataTable;
                if (dt == null)
                    this.WarmAlert("获取付款明细失败", redirectUrl);
                this.PaymentJson = JsonConvert.SerializeObject(dt, new DataTableConverter());

                //审核实体
                JavaScriptSerializer serializer = new JavaScriptSerializer();
                string json = serializer.Serialize(apply);
                this.hidModel.Value = json;

                FundsStyleEnum fundsStyle = (FundsStyleEnum)payApply.PayApplySource;
                result = payApplyBLL.GetAuditInfo(user, payApply.ApplyId, fundsStyle);
                if (result.ResultStatus != 0)
                    this.WarmAlert("获取付款申请审核信息失败", redirectUrl);

                //this.txbAuditInfo.InnerHtml = result.ReturnValue.ToString();

                if (apply.ApplyStatus != StatusEnum.已录入 && apply.ApplyStatus != StatusEnum.待审核 && apply.ApplyStatus != StatusEnum.审核拒绝
                    && apply.ApplyStatus != StatusEnum.已撤返)
                {
                    //this.jqxAuditInfoExpander.Visible = false;
                }
                else if (apply.ApplyStatus == StatusEnum.已生效 || apply.ApplyStatus == StatusEnum.已完成)
                {

                }
            }
        }
Example #8
0
        /// <summary>
        /// 检查页面操作权限
        /// </summary>
        private void CheckOperate()
        {
            Utility.VerificationUtility ver = new Utility.VerificationUtility();
            UserOperate = ver.JudgeUserOperate(this, User, MenuId);

            ver.JudgeOperate(this, MenuId, OperateEnumsMustHave);
        }