Esempio n. 1
0
        /// <summary>
        /// 增加环节处理人实体
        /// </summary>
        /// <param name="model"></param>
        public void Add(wf_workflowspecificusers model)
        {
            Entities db = new Entities();

            db.wf_workflowspecificusers.Add(model);
            db.SaveChanges();
        }
Esempio n. 2
0
        /// <summary>
        /// 修改环节处理人实体
        /// </summary>
        /// <param name="model"></param>
        public void Update(wf_workflowspecificusers model)
        {
            Entities db = new Entities();
            wf_workflowspecificusers result = db.wf_workflowspecificusers
                                              .SingleOrDefault(a => a.wfsuid == model.wfsuid);

            if (result != null)
            {
                result.content      = model.content;
                result.dealtime     = model.dealtime;
                result.status       = model.status;
                result.remark       = model.remark;
                result.ismainuser   = model.ismainuser;
                result.processmode  = model.processmode;
                result.satisfaction = model.satisfaction;
                db.SaveChanges();
            }
        }
Esempio n. 3
0
        /// <summary>
        /// 更新当前环节用户处理的意见
        /// </summary>
        /// <param name="WFSAID">当前环节实例编号</param>
        /// <param name="UserID">处理的人员编号</param>
        /// <param name="CONTENT">处理的意见</param>
        /// <param name="STATUS">当前状态</param>
        /// <param name="STATUS">处理时间</param>
        /// <param name="IsSendMsg">是否发送短信</param>
        /// <param name="OATitle">公文标题</param>
        /// <param name="ISMAINWF">是否主流程</param>
        /// <returns></returns>
        public string function_WF_DealCurentActivityUser(string WFSAID, int UserID, string CONTENT, int STATUS, DateTime?DEALTIME, string IsSendMsg, string OATitle, int?WFCreateUserID, string Remark, string processmode, string satisfaction)
        {
            WF_WorkFlowSpecificUsersDAL wfsuBLL = new WF_WorkFlowSpecificUsersDAL();
            string WFSUID = string.Empty;
            //更新当前环节登录用户的状态及处理的意见
            wf_workflowspecificusers wfsuModel = wfsuBLL.GetList()
                                                 .FirstOrDefault(a => a.wfsaid == WFSAID && a.userid == UserID);

            if (wfsuModel != null)
            {
                wfsuModel.content      = CONTENT;
                wfsuModel.dealtime     = DEALTIME;
                wfsuModel.status       = 2;
                wfsuModel.remark       = Remark;
                wfsuModel.ismainuser   = 1;//是主控人
                wfsuModel.processmode  = processmode;
                wfsuModel.satisfaction = satisfaction;
                wfsuBLL.Update(wfsuModel);
                //返回当前处理人对应的编号
                WFSUID = wfsuModel.wfsuid;
            }
            else
            {
                wfsuModel          = new wf_workflowspecificusers();
                wfsuModel.wfsuid   = GetNewId();
                wfsuModel.userid   = UserID;
                wfsuModel.content  = CONTENT;
                wfsuModel.dealtime = DEALTIME;
                wfsuModel.remark   = Remark;
                wfsuModel.status   = STATUS;

                if (STATUS == 2)
                {
                    wfsuModel.ismainuser = 1;//是主控人
                }

                wfsuModel.wfsaid       = WFSAID;
                wfsuModel.createuserid = WFCreateUserID;
                wfsuModel.createtime   = DateTime.Now;
                wfsuModel.processmode  = processmode;
                wfsuModel.satisfaction = satisfaction;
                wfsuBLL.Add(wfsuModel);
                //返回当前处理人对应的编号
                WFSUID = wfsuModel.wfsuid;

                #region 是否发送短信
                //if (IsSendMsg == "true")
                //{
                //    SYS_USERS uSmodel = UserBLL.GetUserByUserID(UserID);
                //    if (uSmodel != null && !string.IsNullOrEmpty(uSmodel.PHONE))
                //    {
                //        string phone = uSmodel.PHONE;

                //        //phone = "15858196099";
                //        string megContent = "您有一条新的工作需要办理,工作名称为:" + OATitle;

                //        SMSUtility.SendMessage(phone, megContent + "[" +uSmodel.USERNAME + "]", DateTime.Now.Ticks);
                //    }
                //}
                #endregion
            }
            return(WFSUID);
        }