예제 #1
0
        /// <summary>
        /// 修改 资质证书变更申请审核表
        /// </summary>
        /// <param name="saveModel"></param>
        /// <param name="errorMsg"></param>
        /// <returns></returns>
        public bool EditUserChange(t_D_UserChange saveModel, out string errorMsg)
        {
            using (var db = dbFactory.Open())
            {
                using (var dbTrans = db.OpenTransaction())
                {
                    try
                    {
                        errorMsg = string.Empty;

                        db.UpdateOnly(saveModel, r => new
                        {
                            r.unitname,
                            r.area,
                            r.bgnr,
                            r.bgq,
                            r.bgh,
                            r.bgclpath,
                            r.SQname,
                            r.SQTel,
                            r.YZZPath
                        }, r => r.id == saveModel.id);

                        dbTrans.Commit();
                        return(true);
                    }
                    catch (Exception ex)
                    {
                        dbTrans.Rollback();
                        errorMsg = ex.Message;
                        return(false);
                    }
                }
            }
        }
예제 #2
0
        /// <summary>
        /// 审批 资质证书变更申请审核表
        /// </summary>
        /// <param name="saveModel"></param>
        /// <param name="errorMsg"></param>
        /// <returns></returns>
        public bool Approval(t_D_UserChange saveModel, out string errorMsg)
        {
            using (var db = dbFactory.Open())
            {
                using (var dbTrans = db.OpenTransaction())
                {
                    try
                    {
                        errorMsg = string.Empty;

                        db.UpdateOnly(saveModel, r => new
                        {
                            r.@static,
                            r.EndTime
                        }, r => r.id == saveModel.id);

                        dbTrans.Commit();
                        return(true);
                    }
                    catch (Exception ex)
                    {
                        dbTrans.Rollback();
                        errorMsg = ex.Message;
                        return(false);
                    }
                }
            }
        }
예제 #3
0
        /// <summary>
        /// 新增 资质证书变更申请审核表
        /// </summary>
        /// <param name="saveModel"></param>
        /// <param name="errorMsg"></param>
        /// <returns></returns>
        public bool SaveUserChange(t_D_UserChange saveModel, out string errorMsg)
        {
            using (var db = dbFactory.Open())
            {
                using (var dbTrans = db.OpenTransaction())
                {
                    try
                    {
                        errorMsg = string.Empty;

                        db.Insert(saveModel, true);

                        dbTrans.Commit();
                        return(true);
                    }
                    catch (Exception ex)
                    {
                        dbTrans.Rollback();
                        errorMsg = ex.Message;
                        return(false);
                    }
                }
            }
        }