protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { string redirectUrl = "FinancingPledgeApplyList.aspx"; int id = 0; if (string.IsNullOrEmpty(Request.QueryString["id"]) || !int.TryParse(Request.QueryString["id"], out id)) 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); PledgeApplyBLL pledgeApplyBLL = new PledgeApplyBLL(); result = pledgeApplyBLL.Get(User, id); if (result.ResultStatus != 0) this.WarmAlert(result.Message, redirectUrl); CurPledgeApply = result.ReturnValue as PledgeApply; PledgeApplyCashDetailBLL pledgeApplyCashDetailBLL = new PledgeApplyCashDetailBLL(); result = pledgeApplyCashDetailBLL.LoadByPledgeApplyId(User, id); if (result.ResultStatus != 0) this.WarmAlert(result.Message, redirectUrl); List<PledgeApplyCashDetail> pledgeApplyCashDetails = result.ReturnValue as List<PledgeApplyCashDetail>; if (pledgeApplyCashDetails != null && pledgeApplyCashDetails.Any()) hasData = true; } }
public string GetFinancingPledgeApplyCashInfoList(int pagenum, int pagesize, string orderStr, int pledgeApplyId) { try { UserModel user = new UserModel(); PledgeApplyCashDetailBLL bll = new PledgeApplyCashDetailBLL(); SelectModel select = bll.GetCashSelectModel(pagenum, pagesize, orderStr, pledgeApplyId); ResultModel result = bll.Load(user, select); if (result.ResultStatus != 0) return string.Empty; DataTable dt = result.ReturnValue as DataTable; Dictionary<string, object> dic = new Dictionary<string, object>(); dic.Add("count", result.AffectCount); dic.Add("data", dt); return JsonConvert.SerializeObject(dic, new DataTableConverter()); } catch (Exception e) { this.log.ErrorFormat("FinService出错,出错方法:{0},{1}", "GetFinancingPledgeApplyCashInfoList", e.Message); return e.Message; } }