Esempio n. 1
0
        /// <summary>
        /// 批量删除数据
        /// </summary>
        public bool DeleteList(string IDList, out string message)
        {
            message = "删除成功!";
            string[] idArr = IDList.Split(',');
            BLL.System.sys_Process_Exec procBLL = new BLL.System.sys_Process_Exec();
            string tableName  = "proj_Payment";
            string errMessage = procBLL.ExistSubmit(tableName, IDList);

            if (errMessage != "")
            {
                message = errMessage;
                return(false);
            }
            int rows = dal.DeleteList(IDList);

            if (rows == 0)
            {
                message = "对不起,所选数据已被其他人删除!";
                return(false);
            }
            else
            {
                errMessage = procBLL.SetBillProcess_Del(tableName, IDList);
                return(true);
            }
        }
Esempio n. 2
0
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public int Add(SCZM.Model.Proj.proj_Contract model, int submitFlag, out string message)
        {
            message = "保存成功!";
            if (dal.Exists(model.ProjId, 0))
            {
                message = "对不起,该项目合同已存在!";
                return(0);
            }
            string errMessage = "";

            BLL.System.sys_Process_Exec procBLL = new BLL.System.sys_Process_Exec();
            string tableName = "proj_Contract";

            if (submitFlag == 1)
            {
                message    = "保存并提交成功!";
                errMessage = procBLL.CheckSubmit(tableName, model.BillSign, model.DepId, "", model.OperaId);
                if (errMessage != "")
                {
                    message = errMessage;
                    return(0);
                }
            }
            int rowId = dal.Add(model);

            if (rowId < 1)
            {
                message = "保存失败!";
            }
            else
            {
                BLL.System.sys_Attachment attachmenBLL = new BLL.System.sys_Attachment();
                string IDList = (model.AttachmentId_Contract == "" || model.AttachmentId_Contract == null ? "" : model.AttachmentId_Contract + ",") +
                                (model.AttachmentId_ControlCard == "" || model.AttachmentId_ControlCard == null ? "" : model.AttachmentId_ControlCard + ",")
                ;
                string FileUse = "项目合同";
                if (IDList != "")
                {
                    attachmenBLL.UpdateUseList(Utils.DelLastComma(IDList), FileUse, rowId);
                }
                if (submitFlag == 1)
                {
                    errMessage = procBLL.SetBillProcess_Submit(tableName, rowId.ToString(), 1, model.OperaId);
                    if (errMessage != "")
                    {
                        message = "保存成功,但提交失败,请联系系统管理员!";
                    }
                }
            }
            return(rowId);
        }
Esempio n. 3
0
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(SCZM.Model.Proj.proj_Payment model, int submitFlag, out string message)
        {
            message = "保存成功!";
            string errMessage = "";

            BLL.System.sys_Process_Exec procBLL = new BLL.System.sys_Process_Exec();
            string tableName = "proj_Payment";

            Model.Proj.proj_Payment model_old = dal.GetModel(model.ID);
            //----------------------审核不同意(billState==2)重新保存时,重置审批流为草稿状态,再进行保存------------------
            if (model_old.BillState == 2)
            {
                int Num = procBLL.DelBillProcess(model.BillSign, model.ID, tableName, model.OperaId, model.OperaName);
                //if (Num == -1)
                //{
                //    message = "对不起,系统出错,请联系系统管理员!";
                //    return false;
                //}
            }
            //----------------------
            if (submitFlag == 1)
            {
                message    = "保存并提交成功!";
                errMessage = procBLL.CheckSubmit(tableName, model.BillSign, model.DepId, "", model.OperaId);
                if (errMessage != "")
                {
                    message = errMessage;
                    return(false);
                }
            }
            int rows = dal.Update(model);

            if (rows == 0)
            {
                message = "对不起,该条数据已被其他人删除!";
                return(false);
            }
            else
            {
                if (submitFlag == 1)
                {
                    errMessage = procBLL.SetBillProcess_Submit(tableName, model.ID.ToString(), 1, model.OperaId);
                    if (errMessage != "")
                    {
                        message = "保存成功,但提交失败,请联系系统管理员!";
                    }
                }
                return(true);
            }
        }
        private void GetBillProcess(HttpContext context, string btn)
        {
            if (btn != "show")
            {
                context.Response.Write("{\"status\":\"0.2\",\"msg\":\"对不起,您没有操作权限!\"}");
                return;
            }
            try
            {
                string billSign = RequestHelper.GetString("billSign");
                int    billId   = RequestHelper.GetInt("billId", 0);
                if (billSign == "")
                {
                    context.Response.Write("{\"status\":\"0\",\"msg\":\"对不起,单据识别号不能为空!\"}");
                    return;
                }
                if (billId == 0)
                {
                    context.Response.Write("{\"status\":\"0\",\"msg\":\"对不起,单据ID不能为空!\"}");
                    return;
                }
                BLL.System.sys_Process_Exec bll = new BLL.System.sys_Process_Exec();

                //string billStateMemo = bll.GetBillState(billSign, billId);

                DataTable dt = bll.GetBillProcess(billSign, billId).Tables[0];
                //if (dt.Rows.Count == 0)
                //{
                //    context.Response.Write("{\"status\":\"0\",\"msg\":\"对不起,该条数据已被其他人删除!\"}");
                //    return;
                //}
                string rowsStr = Utils.ToJson(dt);

                DataTable historyDT  = bll.GetBillProcessHistory(billSign, billId).Tables[0];
                string    historyStr = Utils.ToJson(historyDT);

                StringBuilder jsonStr = new StringBuilder();
                jsonStr.Append("{\"status\":\"1\",\"msg\":\"数据获取成功!\",\"info\":");
                jsonStr.Append(rowsStr);
                jsonStr.Append(",\"historyInfo\":");
                jsonStr.Append(historyStr);
                jsonStr.Append("}");
                context.Response.Write(jsonStr);
            }
            catch (Exception e)
            {
                context.Response.Write("{\"status\":\"0\",\"msg\":\"对不起,系统出错:" + Utils.HtmlEncode(e.Message) + "\"}");
                return;
            }
        }
Esempio n. 5
0
        /// <summary>
        /// 批量取消审核数据
        /// </summary>
        /// <param name="IDList">ID字符串</param>
        /// <param name="operaId">操作人ID</param>
        /// <param name="message">返回消息</param>
        /// <returns></returns>
        public bool CanclAudit(string IDList, int operaId, out string message)
        {
            message = "取消审批成功!";
            BLL.System.sys_Process_Exec procBLL = new BLL.System.sys_Process_Exec();
            string tableName     = "proj_Payment";
            string resultMessage = "";
            bool   result        = procBLL.SetBillProcess_Audit_Batch(tableName, IDList, 2, operaId, 0, "", out resultMessage);

            if (result == false)
            {
                message = resultMessage;
                return(false);
            }
            return(true);
        }
Esempio n. 6
0
        /// <summary>
        /// 批量审核数据
        /// </summary>
        /// <param name="IDList">ID字符串</param>
        /// <param name="operaId">操作人ID</param>
        /// <param name="flagAudit">审核状态</param>
        /// <param name="auditorOpinion">审核意见</param>
        /// <param name="message">返回消息</param>
        /// <returns></returns>
        public bool Audit(string IDList, int operaId, int flagAudit, string auditorOpinion, out string message)
        {
            message = "审批成功!";
            BLL.System.sys_Process_Exec procBLL = new BLL.System.sys_Process_Exec();
            string tableName     = "proj_Payment";
            string resultMessage = "";
            bool   result        = procBLL.SetBillProcess_Audit_Batch(tableName, IDList, 1, operaId, flagAudit, auditorOpinion, out resultMessage);

            if (result == false)
            {
                message = resultMessage;
                return(false);
            }
            return(true);
        }
        /// <summary>
        /// 更新一条数据

        /// </summary>
        public bool Update(UHPROJ.Model.Base.shop_NewBuildApply model, int submitFlag, out string message)
        {
            message = "保存成功!";
            string errMessage = "";

            BLL.System.sys_Process_Exec procBLL = new BLL.System.sys_Process_Exec();
            string tableName = "shop_NewBuildApply";

            if (submitFlag == 1)
            {
                message    = "保存并提交成功!";
                errMessage = procBLL.CheckSubmit(tableName, model.BillSign, model.DepId, "", model.OperaId);
                if (errMessage != "")
                {
                    message = errMessage;
                    return(false);
                }
            }
            int rows = dal.Update(model);

            if (rows == 0)
            {
                message = "对不起,该条数据已被其他人删除!";
                return(false);
            }
            else
            {
                BLL.System.sys_Attachment attachmenBLL = new BLL.System.sys_Attachment();
                string IDList = (model.AttachmentId_ZSRW == "" || model.AttachmentId_ZSRW == null ? "" : model.AttachmentId_ZSRW + ",") +
                                (model.AttachmentId_GH == "" || model.AttachmentId_GH == null ? "" : model.AttachmentId_GH + ",")
                ;
                string FileUse = "加盟申请";
                if (IDList != "")
                {
                    attachmenBLL.UpdateUseList(Utils.DelLastComma(IDList), FileUse, model.ID);
                }
                if (submitFlag == 1)
                {
                    errMessage = procBLL.SetBillProcess_Submit(tableName, model.ID.ToString(), 1, model.OperaId);
                    if (errMessage != "")
                    {
                        message = "保存成功,但提交失败,请联系系统管理员!";
                    }
                }
                return(true);
            }
        }
Esempio n. 8
0
        /// <summary>
        /// 批量取消提交数据
        /// </summary>
        /// <param name="IDList">ID字符串</param>
        /// <param name="operaId">操作人ID</param>
        /// <param name="message">返回消息</param>
        /// <returns></returns>
        public bool CancelSubmit(string IDList, int operaId, out string message)
        {
            message = "取消提交成功!";
            BLL.System.sys_Process_Exec procBLL = new BLL.System.sys_Process_Exec();
            string tableName  = "proj_Payment";
            string errMessage = procBLL.CheckCancelSubmit(tableName, IDList, operaId);

            if (errMessage != "")
            {
                message = errMessage;
                return(false);
            }
            errMessage = procBLL.SetBillProcess_Submit(tableName, IDList, 2, operaId);
            if (errMessage != "")
            {
                message = errMessage;
                return(false);
            }
            return(true);
        }
        /// <summary>
        /// 批量提交数据
        /// </summary>
        /// <param name="IDList">ID字符串</param>
        /// <param name="operaId">操作人ID</param>
        /// <param name="message">返回消息</param>
        /// <returns></returns>
        public bool Submit(string IDList, int operaId, out string message)
        {
            message = "提交成功!";
            BLL.System.sys_Process_Exec procBLL = new BLL.System.sys_Process_Exec();
            string tableName  = "proj_PartnerContract";
            string errMessage = procBLL.CheckSubmit(tableName, "", 0, IDList, operaId);

            if (errMessage != "")
            {
                message = errMessage;
                return(false);
            }
            errMessage = procBLL.SetBillProcess_Submit(tableName, IDList, 1, operaId);
            if (errMessage != "")
            {
                message = errMessage;
                return(false);
            }
            return(true);
        }
Esempio n. 10
0
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public int Add(SCZM.Model.Proj.proj_Payment model, int submitFlag, out string message)
        {
            message = "保存成功!";
            string errMessage = "";

            BLL.System.sys_Process_Exec procBLL = new BLL.System.sys_Process_Exec();
            string tableName = "proj_Payment";

            if (submitFlag == 1)
            {
                message    = "保存并提交成功!";
                errMessage = procBLL.CheckSubmit(tableName, model.BillSign, model.DepId, "", model.OperaId);
                if (errMessage != "")
                {
                    message = errMessage;
                    return(0);
                }
            }
            int rowId = dal.Add(model);

            if (rowId < 1)
            {
                message = "保存失败!";
            }
            else
            {
                if (submitFlag == 1)
                {
                    errMessage = procBLL.SetBillProcess_Submit(tableName, rowId.ToString(), 1, model.OperaId);
                    if (errMessage != "")
                    {
                        message = "保存成功,但提交失败,请联系系统管理员!";
                    }
                }
            }
            return(rowId);
        }
Esempio n. 11
0
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(SCZM.Model.Proj.proj_Contract model, int submitFlag, out string message)
        {
            message = "保存成功!";
            if (dal.Exists(model.ProjId, model.ID))
            {
                message = "对不起,该项目合同已存在!";
                return(false);
            }

            string errMessage = "";

            BLL.System.sys_Process_Exec procBLL = new BLL.System.sys_Process_Exec();
            string tableName = "proj_Contract";

            Model.Proj.proj_Contract model_old = dal.GetModel(model.ID);
            if (model_old.BillState == 2)
            {
                int Num = procBLL.DelBillProcess(model.BillSign, model.ID, tableName, model.OperaId, model.OperaName);
                //if (Num == -1) {
                //    message = "对不起,系统出错,请联系系统管理员!";
                //    return false;
                //}
            }
            if (submitFlag == 1)
            {
                message    = "保存并提交成功!";
                errMessage = procBLL.CheckSubmit(tableName, model.BillSign, model.DepId, "", model.OperaId);
                if (errMessage != "")
                {
                    message = errMessage;
                    return(false);
                }
            }
            int rows = dal.Update(model);

            if (rows == 0)
            {
                message = "对不起,该条数据已被其他人删除!";
                return(false);
            }
            else
            {
                BLL.System.sys_Attachment attachmenBLL = new BLL.System.sys_Attachment();
                string IDList = (model.AttachmentId_Contract == "" || model.AttachmentId_Contract == null ? "" : model.AttachmentId_Contract + ",") +
                                (model.AttachmentId_ControlCard == "" || model.AttachmentId_ControlCard == null ? "" : model.AttachmentId_ControlCard + ",")
                ;
                string FileUse = "项目合同";
                if (IDList != "")
                {
                    attachmenBLL.UpdateUseList(Utils.DelLastComma(IDList), FileUse, model.ID);
                }

                //
                if (submitFlag == 1)
                {
                    errMessage = procBLL.SetBillProcess_Submit(tableName, model.ID.ToString(), 1, model.OperaId);
                    if (errMessage != "")
                    {
                        message = "保存成功,但提交失败,请联系系统管理员!";
                    }
                }
                return(true);
            }
        }