Example #1
1
        public ResultModel CheckContractSubBusinessInvoiceApplyConfirm(UserModel user, int subId)
        {
            ResultModel result = new ResultModel();

            string cmdText = "select COUNT(*) from dbo.Inv_BusinessInvoice bi inner join dbo.Invoice inv on inv.InvoiceId = bi.InvoiceId where bi.SubContractId = 1 and inv.InvoiceStatus in (@entryStatus,@readyStatus)";

            SqlParameter[] paras = new SqlParameter[3];
            paras[0] = new SqlParameter("@subId", subId);
            paras[1] = new SqlParameter("@entryStatus", (int)NFMT.Common.StatusEnum.已录入);
            paras[1] = new SqlParameter("@readyStatus", (int)NFMT.Common.StatusEnum.已生效);

            object obj = DBUtility.SqlHelper.ExecuteScalar(this.ConnectString, CommandType.Text, cmdText, paras);
            int i = 0;
            if (obj == null || !int.TryParse(obj.ToString(), out i) || i <= 0)
            {
                result.ResultStatus = -1;
                result.Message = "检验业务发票失败";
                return result;
            }
            if (i > 0)
            {
                result.ResultStatus = -1;
                result.Message = "子合约中含有未完成的业务发票,不能进行确认完成操作。";
                return result;
            }

            result.ResultStatus = 0;
            result.Message = "业务发票全部完成";

            return result;
        }
Example #2
0
        public ResultModel CheckContractSubCashInConfirm(UserModel user, int subId)
        {
            ResultModel result = new ResultModel();

            string cmdText = "select COUNT(*) from NFMT.dbo.Fun_CashInContract_Ref cic inner join NFMT.dbo.Fun_CashIn ci on cic.CashInId = ci.CashInId where cic.SubContractId =@subId and ci.CashInStatus in (@entryStatus,@readyStatus)";

            SqlParameter[] paras = new SqlParameter[3];
            paras[0] = new SqlParameter("@subId", subId);
            paras[1] = new SqlParameter("@entryStatus", (int)NFMT.Common.StatusEnum.已录入);
            paras[1] = new SqlParameter("@readyStatus", (int)NFMT.Common.StatusEnum.已生效);

            object obj = DBUtility.SqlHelper.ExecuteScalar(this.ConnectString, CommandType.Text, cmdText, paras);
            int i = 0;
            if (obj == null || !int.TryParse(obj.ToString(), out i) || i <= 0)
            {
                result.ResultStatus = -1;
                result.Message = "检验收款登记失败";
                return result;
            }
            if (i > 0)
            {
                result.ResultStatus = -1;
                result.Message = "子合约中含有未完成的收款登记,不能进行确认完成操作。";
                return result;
            }

            result.ResultStatus = 0;
            result.Message = "收款登记全部完成";

            return result;
        }
Example #3
0
        public ResultModel Confirm(UserModel user, int cashInId)
        {
            ResultModel result = new ResultModel();

            try
            {
                using (System.Transactions.TransactionScope scope = new TransactionScope())
                {
                    //获取收款登记
                    result = this.cashinDAL.Get(user, cashInId);
                    if (result.ResultStatus != 0)
                        return result;

                    Model.CashIn cashIn = result.ReturnValue as Model.CashIn;
                    if (cashIn == null || cashIn.CashInId <= 0)
                    {
                        result.ResultStatus = -1;
                        result.Message = "收款登记不存在";
                        return result;
                    }

                    result = this.cashinDAL.Confirm(user, cashIn);

                    scope.Complete();
                }
            }
            catch (Exception ex)
            {
                result.ResultStatus = -1;
                result.Message = ex.Message;
            }

            return result;
        }
Example #4
0
        public ResultModel GetCanAllotBala(UserModel user, int cashInId, bool isUpdate, decimal alreadyAllotBala = 0)
        {
            ResultModel result = new ResultModel();

            try
            {
                System.Text.StringBuilder sb = new System.Text.StringBuilder();
                sb.Append(" select ci.CashInBala - ISNULL(ref.bala,0) ");
                if (isUpdate)
                    sb.AppendFormat(" + {0} ", alreadyAllotBala);
                sb.AppendFormat(" from dbo.Fun_CashIn ci left join (select ref.CashInId,SUM(ISNULL(ref.AllotBala,0)) bala  from dbo.Fun_CashInCorp_Ref ref where ref.DetailStatus >={0}  group by ref.CashInId) ref on ci.CashInId = ref.CashInId where ci.CashInId = {1}", (int)Common.StatusEnum.已生效,cashInId);

                object obj = NFMT.DBUtility.SqlHelper.ExecuteScalar(this.ConnectString, CommandType.Text, sb.ToString(), null);
                decimal canAllotBala = 0;
                if (obj == null || string.IsNullOrEmpty(obj.ToString()) || !decimal.TryParse(obj.ToString(), out canAllotBala))
                {
                    result.ResultStatus = -1;
                    result.Message = "获取失败";
                }
                else
                {
                    result.ReturnValue = canAllotBala;
                    result.Message = "获取成功";
                    result.ResultStatus = 0;
                }
            }
            catch (Exception e)
            {
                result.Message = e.Message;
                result.ResultStatus = -1;
            }

            return result;
        }
Example #5
0
        public ResultModel Confirm(UserModel user, int orderId)
        {
            ResultModel result = new ResultModel();

            try
            {
                using (System.Transactions.TransactionScope scope = new TransactionScope())
                {
                    result = this.documentorderDAL.Get(user, orderId);
                    if (result.ResultStatus != 0)
                        return result;

                    Model.DocumentOrder order = result.ReturnValue as Model.DocumentOrder;
                    if (order == null || order.OrderId <= 0)
                    {
                        result.Message = "制单指令不存在";
                        result.ResultStatus = -1;
                        return result;
                    }

                    result = this.documentorderDAL.Confirm(user, order);
                    if (result.ResultStatus != 0)
                        return result;

                    scope.Complete();
                }
            }
            catch (Exception ex)
            {
                result.Message = ex.Message;
                result.ResultStatus = -1;
            }

            return result;
        }
Example #6
0
        /// <summary>
        /// 校验子合约中付款申请是否全部确认完成
        /// </summary>
        /// <param name="user"></param>
        /// <param name="subId"></param>
        /// <returns></returns>
        public ResultModel CheckContractSubPayApplyConfirm(UserModel user, int subId)
        {
            ResultModel result = new ResultModel();

            string cmdText = "select COUNT(*) from NFMT.dbo.Fun_ContractPayApply_Ref pac inner join NFMT.dbo.Fun_PayApply pa on pa.PayApplyId = pac.PayApplyId inner join NFMT.dbo.Apply app on pa.ApplyId = app.ApplyId where pac.ContractSubId =@subId and app.ApplyStatus in (@entryStatus,@readyStatus)";

            SqlParameter[] paras = new SqlParameter[3];
            paras[0] = new SqlParameter("@subId", subId);
            paras[1] = new SqlParameter("@entryStatus", (int)NFMT.Common.StatusEnum.已录入);
            paras[1] = new SqlParameter("@readyStatus", (int)NFMT.Common.StatusEnum.已生效);

            object obj = DBUtility.SqlHelper.ExecuteScalar(this.ConnectString, CommandType.Text, cmdText, paras);
            int i = 0;
            if (obj == null || !int.TryParse(obj.ToString(), out i) || i <= 0)
            {
                result.ResultStatus = -1;
                result.Message = "检验付款申请失败";
                return result;
            }
            if (i > 0)
            {
                result.ResultStatus = -1;
                result.Message = "子合约中含有未完成的付款申请,不能进行确认完成操作。";
                return result;
            }

            result.ResultStatus = 0;
            result.Message = "付款申请全部完成";

            return result;
        }
Example #7
0
        public ResultModel GetContractDetail(UserModel user, int contractId, TradeDirectionEnum tradeDirection)
        {
            ResultModel result = new ResultModel();

            try
            {
                System.Data.DataTable dt = NFMT.DBUtility.SqlHelper.ExecuteDataTable(this.ConnectString, GetSQLString(contractId, tradeDirection), null, System.Data.CommandType.Text);
                if (dt != null && dt.Rows.Count > 0)
                {
                    result.ResultStatus = 0;
                    result.Message = "获取成功";
                    result.ReturnValue = dt;
                }
                else
                {
                    result.ResultStatus = -1;
                    result.Message = "获取失败";
                }
            }
            catch (Exception e)
            {
                result.Message = e.Message;
                result.ResultStatus = -1;
            }

            return result;
        }
Example #8
0
        /// <summary>
        /// 添加操作记录
        /// </summary>
        /// <param name="user">当前操作用户</param>
        /// <param name="log">记录实体</param>
        /// <param name="details">记录明细列表</param>
        /// <returns></returns>
        public static ResultModel InsertOperateLog(UserModel user, OperateLogModel log, List<OperateLogDetailModel> details)
        {
            ResultModel result = new ResultModel();

            using (System.Transactions.TransactionScope scope = new System.Transactions.TransactionScope())
            {
                result = InsertOperateLog(user, log);
                if (result.ResultStatus != 0)
                    return result;

                foreach (OperateLogDetailModel m in details)
                {
                    result = InsertOperateLogDetail(user, m);
                    if (result.ResultStatus != 0)
                        return result;
                }

                scope.Complete();

                result.AffectCount = 1;
                result.Message = string.Format("操作记录添加成功,明细共{0}条", details.Count);
                result.ResultStatus = 0;
                result.ReturnValue = 1;
            }

            return result;
        }
Example #9
0
 public override ResultModel AllowOperate(UserModel user, IModel obj, OperateEnum operate)
 {
     return new ResultModel()
     {
         ResultStatus = 0
     };
 }
Example #10
0
        public ResultModel ChangePwd(UserModel user, string oldPwd, string newPwd)
        {
            ResultModel result = new ResultModel();

            try
            {
                using (TransactionScope scope = new TransactionScope(TransactionScopeOption.Required))
                {
                    result = accountDAL.ValidatePwd(user, oldPwd);
                    if (result.ResultStatus != 0)
                        return result;

                    result = accountDAL.ChangePwd(user, newPwd);
                    if (result.ResultStatus != 0)
                        return result;

                    scope.Complete();
                }
            }
            catch (Exception ex)
            {
                result.ResultStatus = -1;
                result.Message = ex.Message;
            }
            finally
            {
                if (result.ResultStatus != 0)
                    this.Log.ErrorFormat("{0} {1},序号:{2}", user.EmpName, result.Message, result.ReturnValue);
                else if (this.Log.IsInfoEnabled)
                    this.Log.InfoFormat("{0} {1},序号:{2}", user.EmpName, result.Message, result.ReturnValue);
            }

            return result;
        }
Example #11
0
        public ResultModel GetAttachIds(UserModel user, int stockInId)
        {
            ResultModel result = new ResultModel();

            try
            {
                string sql = string.Format("select AttachId from dbo.St_StockInAttach sia left join dbo.Attach a on sia.AttachId = a.AttachId where sia.StockInAttachId = {0} and a.AttachStatus = {1} ", stockInId, (int)Common.StatusEnum.已生效);
                DataTable dt = NFMT.DBUtility.SqlHelper.ExecuteDataTable(this.ConnectString, sql, null, CommandType.Text);
                string returnStr = string.Empty;
                if (dt != null && dt.Rows.Count > 0)
                {
                    foreach (DataRow dr in dt.Rows)
                    {
                        returnStr += dr["AttachId"].ToString() + ",";
                    }
                    if (!string.IsNullOrEmpty(returnStr) && returnStr.IndexOf(",") > -1)
                        returnStr = returnStr.Substring(0, returnStr.Length - 1);

                    result.ResultStatus = 0;
                    result.Message = "获取成功";
                    result.ReturnValue = returnStr;
                }
                else
                {
                    result.ResultStatus = -1;
                    result.Message = "获取失败";
                }
            }
            catch (Exception e)
            {
                result.Message = e.Message;
                result.ResultStatus = -1;
            }
            return result;
        }
Example #12
0
        public ResultModel ChangePwd(UserModel user, string newPwd)
        {
            ResultModel result = new ResultModel();

            try
            {
                string sql = string.Format("update dbo.Account set PassWord = '******' where EmpId = {1} and AccStatus = {2}", newPwd.Trim(), user.EmpId, (int)Common.StatusEnum.已生效);
                int i = NFMT.DBUtility.SqlHelper.ExecuteNonQuery(this.ConnectString, CommandType.Text, sql, null);
                if (i > 0)
                {
                    result.ResultStatus = 0;
                    result.Message = "修改密码成功";
                }
                else
                {
                    result.ResultStatus = -1;
                    result.Message = "修改密码失败";
                }
            }
            catch (Exception e)
            {
                result.Message = e.Message;
                result.ResultStatus = -1;
            }

            return result;
        }
Example #13
0
        public ResultModel BaseAudit(UserModel user, Model.DataSource obj, bool isPass)
        {
            ResultModel result = new ResultModel();

            try
            {
                NFMT.Common.Operate operate = NFMT.Common.Operate.CreateOperate(obj.DalName, obj.AssName);

                if (operate == null)
                {
                    result.Message = "模板不存在";
                    result.ResultStatus = -1;
                    return result;
                }

                result = operate.Get(user, obj.BaseName, obj.TableCode, obj.RowId);

                if (result.ResultStatus == 0)
                {
                    NFMT.Common.IModel model = result.ReturnValue as NFMT.Common.IModel;

                    result = operate.Audit(user, model, isPass);
                }
            }
            catch (Exception ex)
            {
                result.ResultStatus = -1;
                result.Message = ex.Message;
                return result;
            }

            return result;
        }
Example #14
0
        public ResultModel GetLastCapitalBySubId(UserModel user, int subId)
        {
            ResultModel result = new ResultModel();

            //获取当前子合约下所有大于已生效的资金流水
            NFMT.Funds.BLL.FundsLogBLL fundsLogBLL = new Funds.BLL.FundsLogBLL();
            result = fundsLogBLL.Load(user, subId);
            if (result.ResultStatus != 0)
                return result;

            List<NFMT.Funds.Model.FundsLog> fundsLogs = result.ReturnValue as List<NFMT.Funds.Model.FundsLog>;
            if (fundsLogs == null)
            {
                result.ResultStatus = -1;
                result.Message = "获取剩余资金失败";
                return result;
            }

            decimal lastCapital = fundsLogs.Sum(temp => temp.FundsBala);

            //子合约价格确认单
            result = this.LoadInterestListBySubId(user, subId,StatusEnum.已录入);
            if (result.ResultStatus != 0)
                return result;

            List<Model.Interest> interests = result.ReturnValue as List<Model.Interest>;

            decimal curCapital = interests.Sum(temp => temp.CurCapital);

            result.ResultStatus = 0;
            result.ReturnValue = lastCapital - curCapital;

            return result;
        }
Example #15
0
        public ResultModel LoadByStockPayApplyId(UserModel user, int stockPayApplyId)
        {
            int readyStatus = (int)Common.StatusEnum.已生效;
            string cmdText = string.Format("select * from dbo.Fun_PaymentStockDetail where PayApplyDetailId={0} and DetailStatus>={1}", stockPayApplyId, readyStatus);

            return Load<Model.PaymentStockDetail>(user, CommandType.Text, cmdText);
        }
Example #16
0
        public ResultModel GetPriceBySubId(UserModel user, int subId)
        {
            ResultModel result = new ResultModel();

            if (subId < 1)
            {
                result.Message = "合约序号不能小于1";
                return result;
            }

            List<SqlParameter> paras = new List<SqlParameter>();
            SqlParameter para = new SqlParameter("@subId", SqlDbType.Int, 4);
            para.Value = subId;
            paras.Add(para);

            SqlDataReader dr = null;

            try
            {
                string cmdText = "select * from dbo.Con_SubPrice where SubId =@subId";
                result = Get(user, CommandType.Text, cmdText, paras.ToArray());
            }
            catch (Exception ex)
            {
                result.ResultStatus = -1;
                result.Message = ex.Message;
            }
            finally
            {
                if (dr != null)
                    dr.Dispose();
            }

            return result;
        }
Example #17
0
        /// <summary>
        /// 添加消息(此方法无事务)
        /// </summary>
        /// <param name="user"></param>
        /// <param name="sms"></param>
        /// <param name="smsDetails"></param>
        /// <returns></returns>
        public ResultModel AddSms(UserModel user, Model.Sms sms, List<Model.SmsDetail> smsDetails)
        {
            ResultModel result = new ResultModel();
            DAL.SmsDetailDAL smsDetailDAL = new SmsDetailDAL();

            try
            {
                result = this.Insert(user, sms);
                if (result.ResultStatus != 0)
                    return result;

                int smsId = (int)result.ReturnValue;

                if (smsDetails != null && smsDetails.Count > 0)
                {
                    foreach (Model.SmsDetail detail in smsDetails)
                    {
                        detail.SmsId = smsId;
                        result = smsDetailDAL.Insert(user, detail);
                        if (result.ResultStatus != 0)
                            return result;
                    }
                }
                if (result.ResultStatus == 0)
                    result.Message = "消息添加成功";
            }
            catch (Exception e)
            {
                result.ResultStatus = -1;
                result.Message = e.Message;
            }

            return result;
        }
Example #18
0
        public ResultModel GetPriceByContractId(UserModel user, int contractId)
        {
            ResultModel result = new ResultModel();

            if (contractId < 1)
            {
                result.Message = "序号不能小于1";
                return result;
            }

            List<SqlParameter> paras = new List<SqlParameter>();
            SqlParameter para = new SqlParameter("@contractId", SqlDbType.Int, 4);
            para.Value = contractId;
            paras.Add(para);

            try
            {
                string cmdText = "select * from NFMT.dbo.Con_ContractPrice where ContractId =@contractId";
                result = Get(user, CommandType.Text, cmdText, paras.ToArray());
            }
            catch (Exception ex)
            {
                result.ResultStatus = -1;
                result.Message = ex.Message;
            }
            return result;
        }
Example #19
0
        public ResultModel GetCurrencyId(UserModel user, int stockId)
        {
            ResultModel result = new ResultModel();

            try
            {
                System.Text.StringBuilder sb = new System.Text.StringBuilder();
                sb.Append("select sub.SettleCurrency from St_StockLog sl  ");
                sb.Append("left join dbo.Con_ContractSub sub on sl.SubContractId = sub.SubId  ");
                sb.AppendFormat("where sl.StockId = {0}", stockId);
                object obj = NFMT.DBUtility.SqlHelper.ExecuteScalar(this.ConnectString, CommandType.Text, sb.ToString(), null);
                int i;
                if (obj != null && !string.IsNullOrEmpty(obj.ToString()) && int.TryParse(obj.ToString(), out i))
                {
                    result.Message = "获取成功";
                    result.ResultStatus = 0;
                    result.ReturnValue = i;
                }
                else
                {
                    result.Message = "获取失败";
                    result.ResultStatus = -1;
                }
            }
            catch (Exception e)
            {
                result.Message = e.Message;
                result.ResultStatus = -1;
            }
            return result;
        }
Example #20
0
        public ResultModel GetStockContractOutCorp(UserModel user, int stockId)
        {
            ResultModel result = new ResultModel();

            try
            {
                System.Text.StringBuilder sb = new System.Text.StringBuilder();
                sb.Append("select corpdetail.CorpId,c.CorpName ");
                sb.Append("from dbo.Con_ContractSub sub  ");
                sb.Append("left join dbo.Con_ContractCorporationDetail corpdetail on sub.ContractId = corpdetail.ContractId ");
                sb.Append("left join NFMT_User.dbo.Corporation c on corpdetail.CorpId = c.CorpId ");
                sb.AppendFormat("where corpdetail.IsInnerCorp = 0 and sub.SubId = (select top 1 SubContractId from dbo.St_StockLog where StockId = {0})", stockId);
                DataTable dt = NFMT.DBUtility.SqlHelper.ExecuteDataTable(this.ConnectString, sb.ToString(), null, CommandType.Text);
                if (dt != null && dt.Rows.Count > 0)
                {
                    result.Message = "获取成功";
                    result.ResultStatus = 0;
                    result.ReturnValue = dt;
                }
                else
                {
                    result.Message = "获取失败";
                    result.ResultStatus = -1;
                }
            }
            catch (Exception e)
            {
                result.Message = e.Message;
                result.ResultStatus = -1;
            }
            return result;
        }
Example #21
0
        public ResultModel InvalidAll(UserModel user, int allotId)
        {
            ResultModel result = new ResultModel();

            try
            {
                string sql = string.Format("update dbo.Fun_CashInStcok_Ref set DetailStatus = {0} where AllotId = {1}", (int)Common.StatusEnum.已作废, allotId);
                int i = NFMT.DBUtility.SqlHelper.ExecuteNonQuery(this.ConnectString, CommandType.Text, sql, null);
                if (i > 0)
                {
                    result.ResultStatus = 0;
                    result.Message = "作废成功";
                }
                else
                {
                    result.Message = "作废失败";
                    result.ResultStatus = -1;
                }
            }
            catch (Exception e)
            {
                result.Message = e.Message;
                result.ResultStatus = -1;
            }

            return result;
        }
Example #22
0
        public ResultModel GetPriceConfirmStockListSelect(UserModel user, int subId,System.Text.StringBuilder sb)
        {
            ResultModel result = new ResultModel();

            try
            {
                System.Data.DataTable dt = NFMT.DBUtility.SqlHelper.ExecuteDataTable(this.ConnectString, sb.ToString(), null, System.Data.CommandType.Text);
                if (dt != null && dt.Rows.Count > 0)
                {
                    result.ResultStatus = 0;
                    result.Message = "获取成功";
                    result.ReturnValue = dt;
                }
                else
                {
                    result.ResultStatus = -1;
                    result.Message = "获取失败";
                }
            }
            catch (Exception e)
            {
                result.ResultStatus = -1;
                result.Message = e.Message;
            }

            return result;
        }
Example #23
0
        public ResultModel GetContractOutCorp(UserModel user, int subId)
        {
            ResultModel result = new ResultModel();

            try
            {
                int readyStatus = (int)StatusEnum.已生效;

                System.Text.StringBuilder sb = new System.Text.StringBuilder();
                sb.Append("select corpdetail.CorpId,corpdetail.CorpName ");
                sb.Append("from dbo.Con_ContractSub sub  ");
                sb.AppendFormat("inner join dbo.Con_ContractCorporationDetail corpdetail on sub.ContractId = corpdetail.ContractId and corpdetail.DetailStatus>={0} ", readyStatus);
                sb.AppendFormat("and corpdetail.IsInnerCorp = 0 where sub.SubId = {0} order by corpdetail.IsDefaultCorp desc", subId);
                DataTable dt = NFMT.DBUtility.SqlHelper.ExecuteDataTable(this.ConnectString, sb.ToString(), null, CommandType.Text);
                if (dt != null && dt.Rows.Count > 0)
                {
                    result.Message = "获取成功";
                    result.ResultStatus = 0;
                    result.ReturnValue = dt;
                }
                else
                {
                    result.Message = "获取失败";
                    result.ResultStatus = -1;
                }
            }
            catch (Exception e)
            {
                result.Message = e.Message;
                result.ResultStatus = -1;
            }

            return result;
        }
Example #24
0
        public ResultModel GetByStockLogId(UserModel user, int stockLogId, StatusEnum status = StatusEnum.已生效)
        {
            string cmdText = string.Format("select * from dbo.St_StockInStock_Ref where StockLogId = {0} and RefStatus >={1}", stockLogId, (int)status);

            ResultModel result = Get(user, CommandType.Text, cmdText, null);

            return result;
        }
Example #25
0
        public override ResultModel AllowOperate(UserModel user, IModel obj, OperateEnum operate)
        {
            if (operate == OperateEnum.修改 || operate == OperateEnum.提交审核)
            {
                return new ResultModel() { ResultStatus = 0 };
            }

            return base.AllowOperate(user, obj, operate);
        }
Example #26
0
        public ResultModel AuditTaskNode(UserModel user, int taskNodeId, bool isPass, string memo, string logResult, string aids)
        {
            ResultModel result = new ResultModel();

            using (System.Transactions.TransactionScope scope = new System.Transactions.TransactionScope(System.Transactions.TransactionScopeOption.Required))
            {
                NFMT.WorkFlow.DAL.TaskNodeDAL taskNodeDAL = new NFMT.WorkFlow.DAL.TaskNodeDAL();
                result = taskNodeDAL.Get(user, taskNodeId);
                if (result.ResultStatus != 0)
                    return result;

                NFMT.WorkFlow.Model.TaskNode taskNode = result.ReturnValue as NFMT.WorkFlow.Model.TaskNode;
                if (taskNode == null || taskNode.TaskNodeId <= 0)
                {
                    result.ResultStatus = -1;
                    result.Message = "任务节点不存在";
                    return result;
                }

                if (taskNode.NodeStatus != StatusEnum.待审核)
                {
                    result.ResultStatus = -1;
                    result.Message = "该节点已审核";
                    return result;
                }

                NFMT.WorkFlow.Model.TaskOperateLog taskOperateLog = new NFMT.WorkFlow.Model.TaskOperateLog()
                {
                    TaskNodeId = taskNode.TaskNodeId,
                    EmpId = user.EmpId,
                    Memo = memo,
                    LogTime = DateTime.Now,
                    LogResult = logResult
                };

                List<NFMT.WorkFlow.Model.TaskAttachOperateLog> taskAttachOperateLogs = new List<TaskAttachOperateLog>();
                if (!string.IsNullOrEmpty(aids))
                {
                    foreach (string s in aids.Split(','))
                    {
                        taskAttachOperateLogs.Add(new TaskAttachOperateLog()
                        {
                            AttachId = Convert.ToInt32(s)
                        });
                    }
                }

                FlowOperate flowOperate = new FlowOperate();
                result = flowOperate.AuditTaskNode(user, taskNode, taskOperateLog, taskAttachOperateLogs, isPass);
                if (result.ResultStatus != 0)
                    return result;

                scope.Complete();
            }

            return result;
        }
Example #27
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;
            }
        }
Example #28
0
        public ResultModel LoadPriceConfirmListBySubId(UserModel user, int subId)
        {
            ResultModel result = new ResultModel();

            string cmdTex = string.Format("select * from dbo.Pri_PriceConfirm where SubId={0} and PriceConfirmStatus >={1}", subId, (int)StatusEnum.已生效);

            result = this.Load<Model.PriceConfirm>(user, System.Data.CommandType.Text, cmdTex);

            return result;
        }
Example #29
0
        public ResultModel LoadInterestListBySubId(UserModel user, int subId,StatusEnum status = StatusEnum.已生效)
        {
            ResultModel result = new ResultModel();

            string cmdTex = string.Format("select * from dbo.Pri_Interest where SubContractId={0} and InterestStatus >={1}", subId, (int)status);

            result = this.Load<Model.Interest>(user, System.Data.CommandType.Text, cmdTex);

            return result;
        }
Example #30
0
        public override ResultModel AllowOperate(UserModel user, IModel obj, OperateEnum operate)
        {
            ResultModel result = new ResultModel();

            if (operate == OperateEnum.作废)
            {
                result.ResultStatus = 0;
                return result;
            }
            return base.AllowOperate(user, obj, operate);
        }