Exemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (!UserOperate.Contains(OperateEnum.提交审核))
                    btnAudit.Style.Add("display", "none");
                if (!UserOperate.Contains(OperateEnum.作废))
                    btnInvalid.Style.Add("display", "none");
                if (!UserOperate.Contains(OperateEnum.撤返))
                    btnGoBack.Style.Add("display", "none");

                string redirectUrl = "FinancingRepoApplyList.aspx";

                navigation1.Routes.Add("赎回申请单列表", redirectUrl);
                navigation1.Routes.Add("赎回申请单明细", string.Empty);

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

                RepoApplyBLL repoApplyBLL = new RepoApplyBLL();
                ResultModel result = repoApplyBLL.Get(User, repoApplyId);
                if (result.ResultStatus != 0)
                    this.WarmAlert(result.Message, redirectUrl);

                CurRepoApply = result.ReturnValue as RepoApply;
                if (CurRepoApply == null || CurRepoApply.RepoApplyId <= 0)
                    this.WarmAlert("获取赎回申请单错误", redirectUrl);

                PledgeApplyBLL pledgeApplyBLL = new PledgeApplyBLL();
                result = pledgeApplyBLL.Get(User, CurRepoApply.PledgeApplyId);
                if (result.ResultStatus != 0)
                    this.WarmAlert(result.Message, redirectUrl);

                CurPledgeApply = result.ReturnValue as PledgeApply;
                if (CurPledgeApply == null || CurPledgeApply.PledgeApplyId <= 0)
                    this.WarmAlert("获取质押申请单错误", redirectUrl);

                FinService service = new FinService();
                selectedJsonUp = service.GetFinPledgeApplyStockDetailForRepoList(1, 500, "pasd.StockDetailId desc", CurPledgeApply.PledgeApplyId);

                selectedJsonDown = service.GetFinRepoApplyStockDetailForUpdateDown(1, 500, "rad.StockDetailId desc", CurPledgeApply.PledgeApplyId, repoApplyId);

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

                NFMT.Finance.EmailInfoProvider provider = new NFMT.Finance.EmailInfoProvider(NFMT.Finance.FinType.赎回, repoApplyId);
                result = provider.GetEmailInfo(User);
                if (result.ResultStatus == 0)
                    emailStr = result.ReturnValue.ToString();
            }
        }
Exemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                string redirectUrl = "FinancingRepoApplyList.aspx";

                if (!UserOperate.Contains(OperateEnum.修改))
                    btnSave.Style.Add("display", "none");

                navigation1.Routes.Add("赎回申请单列表", redirectUrl);
                navigation1.Routes.Add("赎回申请单修改", string.Empty);

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

                RepoApplyBLL repoApplyBLL = new RepoApplyBLL();
                ResultModel result = repoApplyBLL.Get(User, repoApplyId);
                if (result.ResultStatus != 0)
                    this.WarmAlert(result.Message, redirectUrl);

                CurRepoApply = result.ReturnValue as RepoApply;
                if (CurRepoApply == null || CurRepoApply.RepoApplyId <= 0)
                    this.WarmAlert("获取赎回申请单错误", redirectUrl);

                PledgeApplyBLL pledgeApplyBLL = new PledgeApplyBLL();
                result = pledgeApplyBLL.Get(User, CurRepoApply.PledgeApplyId);
                if (result.ResultStatus != 0)
                    this.WarmAlert(result.Message, redirectUrl);

                CurPledgeApply = result.ReturnValue as PledgeApply;
                if (CurPledgeApply == null || CurPledgeApply.PledgeApplyId <= 0)
                    this.WarmAlert("获取质押申请单错误", redirectUrl);

                FinService service = new FinService();
                selectedJsonUp = service.GetFinPledgeApplyStockDetailForRepoList(1, 500, "pasd.StockDetailId desc", CurPledgeApply.PledgeApplyId);

                selectedJsonDown = service.GetFinRepoApplyStockDetailForUpdateDown(1, 500, "rad.StockDetailId desc", CurPledgeApply.PledgeApplyId, repoApplyId);
            }
        }
Exemplo n.º 3
0
        public override IModel CreateModel(SqlDataReader dr)
        {
            RepoApply repoapply = new RepoApply();

            int indexRepoApplyId = dr.GetOrdinal("RepoApplyId");
            repoapply.RepoApplyId = Convert.ToInt32(dr[indexRepoApplyId]);

            int indexRepoApplyIdNo = dr.GetOrdinal("RepoApplyIdNo");
            if (dr["RepoApplyIdNo"] != DBNull.Value)
            {
                repoapply.RepoApplyIdNo = Convert.ToString(dr[indexRepoApplyIdNo]);
            }

            int indexPledgeApplyId = dr.GetOrdinal("PledgeApplyId");
            if (dr["PledgeApplyId"] != DBNull.Value)
            {
                repoapply.PledgeApplyId = Convert.ToInt32(dr[indexPledgeApplyId]);
            }

            int indexSumNetAmount = dr.GetOrdinal("SumNetAmount");
            if (dr["SumNetAmount"] != DBNull.Value)
            {
                repoapply.SumNetAmount = Convert.ToDecimal(dr[indexSumNetAmount]);
            }

            int indexSumHands = dr.GetOrdinal("SumHands");
            if (dr["SumHands"] != DBNull.Value)
            {
                repoapply.SumHands = Convert.ToInt32(dr[indexSumHands]);
            }

            int indexRepoApplyStatus = dr.GetOrdinal("RepoApplyStatus");
            if (dr["RepoApplyStatus"] != DBNull.Value)
            {
                repoapply.RepoApplyStatus = (Common.StatusEnum)Convert.ToInt32(dr[indexRepoApplyStatus]);
            }

            int indexCreatorId = dr.GetOrdinal("CreatorId");
            if (dr["CreatorId"] != DBNull.Value)
            {
                repoapply.CreatorId = Convert.ToInt32(dr[indexCreatorId]);
            }

            int indexCreateTime = dr.GetOrdinal("CreateTime");
            if (dr["CreateTime"] != DBNull.Value)
            {
                repoapply.CreateTime = Convert.ToDateTime(dr[indexCreateTime]);
            }

            int indexLastModifyId = dr.GetOrdinal("LastModifyId");
            if (dr["LastModifyId"] != DBNull.Value)
            {
                repoapply.LastModifyId = Convert.ToInt32(dr[indexLastModifyId]);
            }

            int indexLastModifyTime = dr.GetOrdinal("LastModifyTime");
            if (dr["LastModifyTime"] != DBNull.Value)
            {
                repoapply.LastModifyTime = Convert.ToDateTime(dr[indexLastModifyTime]);
            }

            return repoapply;
        }
Exemplo n.º 4
0
        public override IModel CreateModel(DataRow dr)
        {
            RepoApply repoapply = new RepoApply();

            repoapply.RepoApplyId = Convert.ToInt32(dr["RepoApplyId"]);

            if (dr["RepoApplyIdNo"] != DBNull.Value)
            {
                repoapply.RepoApplyIdNo = Convert.ToString(dr["RepoApplyIdNo"]);
            }

            if (dr["PledgeApplyId"] != DBNull.Value)
            {
                repoapply.PledgeApplyId = Convert.ToInt32(dr["PledgeApplyId"]);
            }

            if (dr["SumNetAmount"] != DBNull.Value)
            {
                repoapply.SumNetAmount = Convert.ToDecimal(dr["SumNetAmount"]);
            }

            if (dr["SumHands"] != DBNull.Value)
            {
                repoapply.SumHands = Convert.ToInt32(dr["SumHands"]);
            }

            if (dr["RepoApplyStatus"] != DBNull.Value)
            {
                repoapply.RepoApplyStatus = (Common.StatusEnum)Convert.ToInt32(dr["RepoApplyStatus"]);
            }

            if (dr["CreatorId"] != DBNull.Value)
            {
                repoapply.CreatorId = Convert.ToInt32(dr["CreatorId"]);
            }

            if (dr["CreateTime"] != DBNull.Value)
            {
                repoapply.CreateTime = Convert.ToDateTime(dr["CreateTime"]);
            }

            if (dr["LastModifyId"] != DBNull.Value)
            {
                repoapply.LastModifyId = Convert.ToInt32(dr["LastModifyId"]);
            }

            if (dr["LastModifyTime"] != DBNull.Value)
            {
                repoapply.LastModifyTime = Convert.ToDateTime(dr["LastModifyTime"]);
            }

            return repoapply;
        }
Exemplo n.º 5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                string redirectUrl = "FinancingRepoApplyList.aspx";

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

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

                TaskNodeBLL taskNodeBLL = new TaskNodeBLL();
                ResultModel result = taskNodeBLL.Get(User, taskNodeId);
                if (result.ResultStatus != 0)
                    this.WarmAlert(result.Message, redirectUrl);

                TaskNode taskNode = result.ReturnValue as TaskNode;
                if (taskNode == null || taskNode.TaskNodeId <= 0 || taskNode.NodeStatus != StatusEnum.待审核 || taskNode.EmpId != User.EmpId)
                    Response.Redirect(redirectUrl);

                TaskBLL taskBLL = new TaskBLL();
                result = taskBLL.Get(User, taskNode.TaskId);
                if (result.ResultStatus != 0)
                    this.WarmAlert(result.Message, redirectUrl);

                Task task = result.ReturnValue as Task;
                if (task.TaskStatus != StatusEnum.已生效)
                    Response.Redirect(redirectUrl);

                RepoApplyBLL repoApplyBLL = new RepoApplyBLL();
                result = repoApplyBLL.Get(User, repoApplyId);
                if (result.ResultStatus != 0)
                    this.WarmAlert(result.Message, redirectUrl);

                CurRepoApply = result.ReturnValue as RepoApply;
                if (CurRepoApply == null || CurRepoApply.RepoApplyId <= 0)
                    this.WarmAlert("获取赎回申请单错误", redirectUrl);

                PledgeApplyBLL pledgeApplyBLL = new PledgeApplyBLL();
                result = pledgeApplyBLL.Get(User, CurRepoApply.PledgeApplyId);
                if (result.ResultStatus != 0)
                    this.WarmAlert(result.Message, redirectUrl);

                CurPledgeApply = result.ReturnValue as PledgeApply;
                if (CurPledgeApply == null || CurPledgeApply.PledgeApplyId <= 0)
                    this.WarmAlert("获取质押申请单错误", redirectUrl);

                FinService service = new FinService();
                selectedJsonUp = service.GetFinPledgeApplyStockDetailForRepoList(1, 500, "pasd.StockDetailId desc", CurPledgeApply.PledgeApplyId);

                selectedJsonDown = service.GetFinRepoApplyStockDetailForUpdateDown(1, 500, "rad.StockDetailId desc", CurPledgeApply.PledgeApplyId, repoApplyId);
            }
        }