Пример #1
0
        /// <summary>
        /// 审批费用报表
        /// </summary>
        public void ApprovalReport(HttpContext context)
        {
            var ids = context.Request.QueryString["ids"];

            if (!string.IsNullOrEmpty(ids))
            {
                var    eBll        = new BLL.ExpenseBLL();
                var    idArr       = ids.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
                string faileReason = "";
                int    failTimes   = 0;
                foreach (var eId in idArr)
                {
                    string thisFailReason;
                    var    result = eBll.Approval(long.Parse(eId), LoginUserId, out thisFailReason);
                    if (!result)
                    {
                        failTimes++;
                        if (!string.IsNullOrEmpty(thisFailReason))
                        {
                            faileReason += thisFailReason + "\r";
                        }
                    }
                }
                context.Response.Write(new Tools.Serialize().SerializeJson(new { result = failTimes == 0, reason = faileReason }));
            }
        }
Пример #2
0
        /// <summary>
        /// 删除费用
        /// </summary>
        public void DeleteExpenseReport(HttpContext context)
        {
            var eid = context.Request.QueryString["report_id"];

            if (!string.IsNullOrEmpty(eid))
            {
                string reason = "";
                var    result = new BLL.ExpenseBLL().DeleteReport(long.Parse(eid), LoginUserId, out reason);
                context.Response.Write(new EMT.Tools.Serialize().SerializeJson(new { result = result, reason = reason }));
            }
        }
Пример #3
0
        /// <summary>
        /// 将已经支付的费用报表返回为审批状态
        /// </summary>
        public void ReturnApproval(HttpContext context)
        {
            var eid = context.Request.QueryString["id"];

            if (!string.IsNullOrEmpty(eid))
            {
                string failReason = "";
                var    result     = new BLL.ExpenseBLL().ReturnApproval(long.Parse(eid), LoginUserId, out failReason);
                context.Response.Write(new Tools.Serialize().SerializeJson(new { result = result, reason = failReason }));
            }
        }
Пример #4
0
        public void AllReturnApproval(HttpContext context)
        {
            var ids = context.Request.QueryString["ids"];

            if (!string.IsNullOrEmpty(ids))
            {
                var idArr      = ids.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
                var rBll       = new BLL.ExpenseBLL();
                int faileTimes = 0;
                foreach (var eid in idArr)
                {
                    string faileReason;
                    var    result = rBll.ReturnApproval(long.Parse(eid), LoginUserId, out faileReason);
                    if (!result)
                    {
                        faileTimes++;
                    }
                }
                context.Response.Write(faileTimes == 0);
            }
        }