• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# HelMagUtility.ResultModel类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中HelMagUtility.ResultModel的典型用法代码示例。如果您正苦于以下问题:C# ResultModel类的具体用法?C# ResultModel怎么用?C# ResultModel使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ResultModel类属于HelMagUtility命名空间,在下文中一共展示了ResultModel类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: GetOperationLogList

        public static ResultModel GetOperationLogList(QueryTerms queryTerms)
        {
            List<OperationLog> logList = new List<OperationLog>();
            int totalCount = 0;
            ResultModel result = new ResultModel();

            try
            {
                logList = (List<OperationLog>)(OperationLogDal.GetList(queryTerms));
                totalCount = Convert.ToInt32(OperationLogDal.GetTotalCount(queryTerms));

                result.Data = logList;
                result.DataSize = totalCount;
                result.IsSuccess = true;
                result.ResultCode = SymbolicConstant.RESULTCODE_GETLIST_SUCCESS;

                return result;;
            }
            catch (Exception exception)
            {
                result.Data = logList;
                result.DataSize = totalCount;
                result.IsSuccess = true;
                result.ResultCode = SymbolicConstant.RESULTCODE_GETLIST_ERROR;
                result.ResultMessage = exception.Message;
                return result;
            }
        }
开发者ID:ZeeMenng,项目名称:HealthManagement,代码行数:28,代码来源:OperationLogBll.cs


示例2: Delete

        /// <summary>
        /// 根据记录主键,删除指定记录。
        /// </summary>
        /// <param name="cardUserId">记录主键</param>
        /// <returns>删除结果,包括是否删除成功、记录主键等信息</returns>
        public static ResultModel Delete(string cardUserId)
        {
            OperationLog log = new OperationLog();
            ResultModel result = new ResultModel();
            try
            {
                log.OperationLogId = System.Guid.NewGuid().ToString("N");
                log.UserId = CurrentSession.getUser().UserId;
                log.OperationTypeCode = SymbolicConstant.OPERATIONTYPE_DELETE;
                log.OperationContent = SymbolicConstant.OPERATIONCONTENT_DELETE;
                log.AddTime = DateTime.Now;
                log.ObjectRecordId = cardUserId;
                log.OperationTable = typeof(CardUser).Name;
                log.IsSuccessId = SymbolicConstant.ISSUCCESS_TRUE;
                log.ResultCode = SymbolicConstant.RESULTCODE_DELETE_SUCCESS;
                log.ResultMessage=SymbolicConstant.RESULTMESSAGE_DELETE_SUCCESS;

                CardUser cardUser =(CardUser)GetCardUserById(cardUserId).Data;
                CardUserDal.Delete(cardUser);

                result.IsSuccess = true;
                result.ObjectRecordId = cardUserId;
                result.ResultCode = SymbolicConstant.RESULTCODE_DELETE_SUCCESS;
                result.ResultMessage = SymbolicConstant.RESULTMESSAGE_DELETE_SUCCESS;

                return result;
            }
            catch (Exception exception)
            {
                log.IsSuccessId = SymbolicConstant.ISSUCCESS_FALSE;
                log.ResultCode = SymbolicConstant.RESULTCODE_DELETE_ERROR;
                log.ResultMessage=exception.Message;

                result.IsSuccess = false;
                result.ObjectRecordId = cardUserId;
                result.ResultCode = SymbolicConstant.RESULTCODE_DELETE_ERROR;
                result.ResultMessage = exception.Message;

                return result;
            }
            finally
            {
                OperationLogBll.Insert(log);
            }
        }
开发者ID:ZeeMenng,项目名称:HealthManagement,代码行数:50,代码来源:CardUserBll.cs


示例3: Delete

        public static ResultModel Delete(string operationLogId)
        {
            OperationLog log = new OperationLog();
            ResultModel result = new ResultModel();
            try
            {
                log = (OperationLog)GetOperationLogById(operationLogId).Data;
                OperationLogDal.Delete(log);
                result.IsSuccess = true;
                result.ObjectRecordId = log.OperationLogId;
                result.ResultCode = SymbolicConstant.RESULTCODE_DELETE_SUCCESS;
                return result;

            }
            catch (Exception e)
            {
                System.Console.Write(e.Message);
                result.ResultCode = SymbolicConstant.RESULTCODE_DELETE_ERROR;
                result.IsSuccess = false;
                return result;
            }
        }
开发者ID:ZeeMenng,项目名称:HealthManagement,代码行数:22,代码来源:OperationLogBll.cs


示例4: GetOperationLogById

 public static ResultModel GetOperationLogById(string operationLogId)
 {
     OperationLog log = new OperationLog();
     ResultModel result = new ResultModel();
     try
     {
         log = OperationLogDal.GetModel(operationLogId);
         result.Data = log;
         result.DataSize = 1;
         result.IsSuccess = true;
         result.ResultCode = SymbolicConstant.RESULTCODE_GETMODEL_SUCCESS;
         return result;
     }
     catch (Exception exception)
     {
         result.Data = log;
         result.DataSize = 1;
         result.IsSuccess = false;
         result.ResultCode = SymbolicConstant.RESULTCODE_GETMODEL_ERROR;
         result.ResultMessage = exception.Message;
         return result;
     }
 }
开发者ID:ZeeMenng,项目名称:HealthManagement,代码行数:23,代码来源:OperationLogBll.cs


示例5: Delete

        /// <summary>
        /// 根据记录主键,删除指定记录。
        /// </summary>
        /// <param name="userId">记录主键</param>
        /// <param name="isLog">是否写入日志</param>
        /// <returns>删除结果,包括是否删除成功、记录主键等信息</returns>
        public static ResultModel Delete(string serviceItemId, bool isLog)
        {
            if (isLog)
                return Delete(serviceItemId);
            ResultModel result = new ResultModel();
            try
            {
                ServiceItem serviceItem =(ServiceItem)GetServiceItemById(serviceItemId).Data;
                ServiceItemDal.Delete(serviceItem);

                result.IsSuccess = true;
                result.ObjectRecordId = serviceItemId;
                result.ResultCode = SymbolicConstant.RESULTCODE_DELETE_SUCCESS;
                result.ResultMessage = SymbolicConstant.RESULTMESSAGE_DELETE_SUCCESS;

                return result;
            }
            catch (Exception exception)
            {
                result.IsSuccess = false;
                result.ObjectRecordId = serviceItemId;
                result.ResultCode = SymbolicConstant.RESULTCODE_DELETE_ERROR;
                result.ResultMessage = exception.Message;

                return result;
            }
        }
开发者ID:ZeeMenng,项目名称:HealthManagement,代码行数:33,代码来源:ServiceItemBll.cs


示例6: Update

        /// <summary>
        /// 修改某条记录
        /// </summary>
        /// <param name="user">要修改记录对应的实体</param>
        /// <returns>修改结果,包括是否修改成功、记录主键等信息</returns>
        public static ResultModel Update(ServiceItem serviceItem)
        {
            OperationLog log = new OperationLog();
            ResultModel result = new ResultModel();

            try
            {

                log.AddTime = DateTime.Now;
                log.IsSuccessId = SymbolicConstant.ISSUCCESS_TRUE;
                log.OperationLogId = System.Guid.NewGuid().ToString("N");
                log.OperationContent = SymbolicConstant.OPERATIONCONTENT_UPDATE;
                log.OperationTable = typeof(ServiceItem).Name;
                log.OperationTypeCode = SymbolicConstant.OPERATIONTYPE_UPDATE;
                log.ResultCode = SymbolicConstant.RESULTCODE_UPDATE_SUCCESS;
                log.ResultMessage=SymbolicConstant.RESULTMESSAGE_UPDATE_SUCCESS;
                log.UserId = CurrentSession.getUser().UserId;

                log.ObjectRecordId = serviceItem.ItemId;
                ServiceItemDal.Update(serviceItem);

                result.IsSuccess = true;
                result.ObjectRecordId = serviceItem.ItemId;
                result.ResultCode = SymbolicConstant.RESULTCODE_UPDATE_SUCCESS;
                result.ResultMessage = SymbolicConstant.RESULTMESSAGE_UPDATE_SUCCESS;

                return result;
            }
            catch (Exception exception)
            {
                log.ResultCode = SymbolicConstant.RESULTCODE_UPDATE_ERROR;
                log.IsSuccessId = SymbolicConstant.ISSUCCESS_FALSE;
                log.ResultMessage=exception.Message;

                result.IsSuccess = false;
                result.ObjectRecordId =serviceItem.ItemId;
                result.ResultCode = SymbolicConstant.RESULTCODE_UPDATE_ERROR;
                result.ResultMessage = exception.Message;

                return result;
            }
            finally
            {
                OperationLogBll.Insert(log);
            }
        }
开发者ID:ZeeMenng,项目名称:HealthManagement,代码行数:51,代码来源:ServiceItemBll.cs


示例7: Update

        /// <summary>
        /// 修改某条记录
        /// </summary>
        /// <param name="user">要修改记录对应的实体</param>
        /// <param name="isLog">是否写入日志</param>
        /// <returns>修改结果,包括是否修改成功、记录主键等信息</returns>
        public static ResultModel Update(Dictionary dictionary, bool isLog)
        {
            if (isLog)
                return Update(dictionary);

            ResultModel result = new ResultModel();

            try
            {
                DictionaryDal.Update(dictionary);

                result.IsSuccess = true;
                result.ObjectRecordId = dictionary.DictId;
                result.ResultCode = SymbolicConstant.RESULTCODE_UPDATE_SUCCESS;
                result.ResultMessage = SymbolicConstant.RESULTMESSAGE_UPDATE_SUCCESS;

                return result;
            }
            catch (Exception exception)
            {
                result.IsSuccess = false;
                result.ObjectRecordId =dictionary.DictId;
                result.ResultCode = SymbolicConstant.RESULTCODE_UPDATE_ERROR;
                result.ResultMessage = exception.Message;

                return result;
            }
        }
开发者ID:ZeeMenng,项目名称:HealthManagement,代码行数:34,代码来源:DictionaryBll.cs


示例8: GetServiceItemById

        /// <summary>
        /// 根据主键查询指定记录
        /// </summary>
        /// <param name="serviceItemId">主键</param>
        /// <param name="isLog">是否写入日志</param>
        /// <returns>查询结果,封装了查询出的实体</returns>
        public static ResultModel GetServiceItemById(string serviceItemId, bool isLog)
        {
            if (isLog)
                return GetServiceItemById(serviceItemId);
            ServiceItem serviceItem = new ServiceItem();
            ResultModel result = new ResultModel();

            try
            {
                serviceItem= ServiceItemDal.GetModel(serviceItemId);
                result.Data =  serviceItem;
                result.IsSuccess = true;
                result.ResultCode = SymbolicConstant.RESULTCODE_GETMODEL_SUCCESS;
                result.ResultMessage=SymbolicConstant.RESULTMESSAGE_GETMODEL_SUCCESS;

                return result;
            }
            catch (Exception exception)
            {
                result.IsSuccess = false;
                result.ResultCode = SymbolicConstant.RESULTCODE_GETMODEL_ERROR;
                result.ResultMessage = exception.Message;

                return result;
            }
        }
开发者ID:ZeeMenng,项目名称:HealthManagement,代码行数:32,代码来源:ServiceItemBll.cs


示例9: GetCardUserById

        /// <summary>
        /// 根据主键查询指定记录
        /// </summary>
        /// <param name="cardUserId">主键</param>
        /// <param name="isLog">是否写入日志</param>
        /// <returns>查询结果,封装了查询出的实体</returns>
        public static ResultModel GetCardUserById(string cardUserId, bool isLog)
        {
            if (isLog)
                return GetCardUserById(cardUserId);
            CardUser cardUser = new CardUser();
            ResultModel result = new ResultModel();

            try
            {
                cardUser= CardUserDal.GetModel(cardUserId);
                result.Data =  cardUser;
                result.IsSuccess = true;
                result.ResultCode = SymbolicConstant.RESULTCODE_GETMODEL_SUCCESS;
                result.ResultMessage=SymbolicConstant.RESULTMESSAGE_GETMODEL_SUCCESS;

                return result;
            }
            catch (Exception exception)
            {
                result.IsSuccess = false;
                result.ResultCode = SymbolicConstant.RESULTCODE_GETMODEL_ERROR;
                result.ResultMessage = exception.Message;

                return result;
            }
        }
开发者ID:ZeeMenng,项目名称:HealthManagement,代码行数:32,代码来源:CardUserBll.cs


示例10: GetCardUserList

        /// <summary>
        /// 根据查询条件获取CardUser表中符合查询条件的记录
        /// </summary>
        /// <param name="queryTerms">自定义查询条件</param>
        /// <param name="isLog">是否写入日志</param>
        /// <returns>查询结果,封装了查询的数据信息</returns>
        public static ResultModel GetCardUserList(QueryTerms queryTerms, bool isLog)
        {
            if (isLog)
                return GetCardUserList(queryTerms);
            List<CardUser> cardUserList = new List<CardUser>();
            int totalCount = 0;
            ResultModel result = new ResultModel();

            try
            {
                cardUserList = (List<CardUser>)(CardUserDal.GetList(queryTerms));
                totalCount=Convert.ToInt32(SystemUserDal.GetTotalCount(queryTerms));

                result.Data = cardUserList;
                result.DataSize = totalCount;
                result.IsSuccess = true;
                result.ResultCode = SymbolicConstant.RESULTCODE_GETLIST_SUCCESS;
                result.ResultMessage = SymbolicConstant.RESULTMESSAGE_GETLIST_SUCCESS;

                return result;
            }
            catch (Exception exception)
            {
                result.IsSuccess = false;
                result.ResultCode = SymbolicConstant.RESULTCODE_GETLIST_ERROR;
                result.ResultMessage = exception.Message;

                return result;
            }
        }
开发者ID:ZeeMenng,项目名称:HealthManagement,代码行数:36,代码来源:CardUserBll.cs


示例11: Update

 public static ResultModel Update(OperationLog log)
 {
     ResultModel result = new ResultModel();
     object id = new object();
     try
     {
         OperationLogDal.Update(log);
         result.IsSuccess = true;
         result.ObjectRecordId = log.OperationLogId;
         result.ResultCode = SymbolicConstant.RESULTCODE_UPDATE_SUCCESS;
         return result;
     }
     catch (Exception exception)
     {
         result.ResultCode = SymbolicConstant.RESULTCODE_UPDATE_ERROR;
         result.IsSuccess = false;
         result.ResultMessage = exception.Message;
         return result;
     }
 }
开发者ID:ZeeMenng,项目名称:HealthManagement,代码行数:20,代码来源:OperationLogBll.cs


示例12: GetConsumptionStatusById

        /// <summary>
        /// 根据主键查询指定记录
        /// </summary>
        /// <param name="consumptionStatusId">主键</param>
        /// <param name="isLog">是否写入日志</param>
        /// <returns>查询结果,封装了查询出的实体</returns>
        public static ResultModel GetConsumptionStatusById(string consumptionStatusId, bool isLog)
        {
            if (isLog)
                return GetConsumptionStatusById(consumptionStatusId);
            ConsumptionStatus consumptionStatus = new ConsumptionStatus();
            ResultModel result = new ResultModel();

            try
            {
                consumptionStatus= ConsumptionStatusDal.GetModel(consumptionStatusId);
                result.Data =  consumptionStatus;
                result.IsSuccess = true;
                result.ResultCode = SymbolicConstant.RESULTCODE_GETMODEL_SUCCESS;
                result.ResultMessage=SymbolicConstant.RESULTMESSAGE_GETMODEL_SUCCESS;

                return result;
            }
            catch (Exception exception)
            {
                result.IsSuccess = false;
                result.ResultCode = SymbolicConstant.RESULTCODE_GETMODEL_ERROR;
                result.ResultMessage = exception.Message;

                return result;
            }
        }
开发者ID:ZeeMenng,项目名称:HealthManagement,代码行数:32,代码来源:ConsumptionStatusBll.cs


示例13: Delete

        /// <summary>
        /// 根据记录主键,删除指定记录。
        /// </summary>
        /// <param name="userId">记录主键</param>
        /// <param name="isLog">是否写入日志</param>
        /// <returns>删除结果,包括是否删除成功、记录主键等信息</returns>
        public static ResultModel Delete(string roleId, bool isLog)
        {
            if (isLog)
                return Delete(roleId);
            ResultModel result = new ResultModel();
            try
            {
                Role role =(Role)GetRoleById(roleId).Data;
                RoleDal.Delete(role);

                result.IsSuccess = true;
                result.ObjectRecordId = roleId;
                result.ResultCode = SymbolicConstant.RESULTCODE_DELETE_SUCCESS;
                result.ResultMessage = SymbolicConstant.RESULTMESSAGE_DELETE_SUCCESS;

                return result;
            }
            catch (Exception exception)
            {
                result.IsSuccess = false;
                result.ObjectRecordId = roleId;
                result.ResultCode = SymbolicConstant.RESULTCODE_DELETE_ERROR;
                result.ResultMessage = exception.Message;

                return result;
            }
        }
开发者ID:ZeeMenng,项目名称:HealthManagement,代码行数:33,代码来源:RoleBll.cs


示例14: GetConsultationById

        /// <summary>
        /// 根据主键查询指定记录
        /// </summary>
        /// <param name="userId">主键</param>
        /// <returns>查询结果,封装了查询出的实体</returns>
        public static ResultModel GetConsultationById(string consultationId)
        {
            OperationLog log = new OperationLog();
            Consultation consultation = new Consultation();
            ResultModel result = new ResultModel();

            try
            {
                consultation  = ConsultationDal.GetModel(consultationId);

                log.AddTime = DateTime.Now;
                log.OperationLogId = System.Guid.NewGuid().ToString("N");
                log.OperationTypeCode = SymbolicConstant.OPERATIONTYPE_GETMODEL;
                log.OperationContent = SymbolicConstant.OPERATIONCONTENT_GETMODEL;
                log.OperationTable = typeof(Consultation).Name;
                log.ObjectRecordId = consultationId;
                log.ResultCode = SymbolicConstant.RESULTCODE_GETMODEL_SUCCESS;
                log.ResultMessage=SymbolicConstant.RESULTMESSAGE_GETMODEL_SUCCESS;
                log.UserId = CurrentSession.getUser().UserId;
                log.IsSuccessId = SymbolicConstant.ISSUCCESS_TRUE;

                result.Data =  consultation;
                result.IsSuccess = true;
                result.ResultCode = SymbolicConstant.RESULTCODE_GETMODEL_SUCCESS;
                result.ResultMessage=SymbolicConstant.RESULTMESSAGE_GETMODEL_SUCCESS;
                return result;
            }
            catch (Exception exception)
            {
                log.ResultCode = SymbolicConstant.RESULTCODE_GETMODEL_ERROR;
                log.IsSuccessId = SymbolicConstant.ISSUCCESS_FALSE;
                log.ResultMessage=exception.Message;

                result.IsSuccess = false;
                result.ResultCode = SymbolicConstant.RESULTCODE_GETMODEL_ERROR;
                result.ResultMessage = exception.Message;

                return result;
            }
            finally
            {
                OperationLogBll.Insert(log);
            }
        }
开发者ID:ZeeMenng,项目名称:HealthManagement,代码行数:49,代码来源:ConsultationBll.cs


示例15: GetRoleById

        /// <summary>
        /// 根据主键查询指定记录
        /// </summary>
        /// <param name="roleId">主键</param>
        /// <param name="isLog">是否写入日志</param>
        /// <returns>查询结果,封装了查询出的实体</returns>
        public static ResultModel GetRoleById(string roleId, bool isLog)
        {
            if (isLog)
                return GetRoleById(roleId);
            Role role = new Role();
            ResultModel result = new ResultModel();

            try
            {
                role= RoleDal.GetModel(roleId);
                result.Data =  role;
                result.IsSuccess = true;
                result.ResultCode = SymbolicConstant.RESULTCODE_GETMODEL_SUCCESS;
                result.ResultMessage=SymbolicConstant.RESULTMESSAGE_GETMODEL_SUCCESS;

                return result;
            }
            catch (Exception exception)
            {
                result.IsSuccess = false;
                result.ResultCode = SymbolicConstant.RESULTCODE_GETMODEL_ERROR;
                result.ResultMessage = exception.Message;

                return result;
            }
        }
开发者ID:ZeeMenng,项目名称:HealthManagement,代码行数:32,代码来源:RoleBll.cs


示例16: Update

        /// <summary>
        /// 修改某条记录
        /// </summary>
        /// <param name="user">要修改记录对应的实体</param>
        /// <param name="isLog">是否写入日志</param>
        /// <returns>修改结果,包括是否修改成功、记录主键等信息</returns>
        public static ResultModel Update(RoleRight roleRight, bool isLog)
        {
            if (isLog)
                return Update(roleRight);

            ResultModel result = new ResultModel();

            try
            {
                RoleRightDal.Update(roleRight);

                result.IsSuccess = true;
                result.ObjectRecordId = roleRight.RoleId;
                result.ResultCode = SymbolicConstant.RESULTCODE_UPDATE_SUCCESS;
                result.ResultMessage = SymbolicConstant.RESULTMESSAGE_UPDATE_SUCCESS;

                return result;
            }
            catch (Exception exception)
            {
                result.IsSuccess = false;
                result.ObjectRecordId =roleRight.RoleId;
                result.ResultCode = SymbolicConstant.RESULTCODE_UPDATE_ERROR;
                result.ResultMessage = exception.Message;

                return result;
            }
        }
开发者ID:ZeeMenng,项目名称:HealthManagement,代码行数:34,代码来源:RoleRightBll.cs


示例17: Delete

        /// <summary>
        /// 根据记录主键,删除指定记录。
        /// </summary>
        /// <param name="userId">记录主键</param>
        /// <param name="isLog">是否写入日志</param>
        /// <returns>删除结果,包括是否删除成功、记录主键等信息</returns>
        public static ResultModel Delete(string dictionaryId, bool isLog)
        {
            if (isLog)
                return Delete(dictionaryId);
            ResultModel result = new ResultModel();
            try
            {
                Dictionary dictionary =(Dictionary)GetDictionaryById(dictionaryId).Data;
                DictionaryDal.Delete(dictionary);

                result.IsSuccess = true;
                result.ObjectRecordId = dictionaryId;
                result.ResultCode = SymbolicConstant.RESULTCODE_DELETE_SUCCESS;
                result.ResultMessage = SymbolicConstant.RESULTMESSAGE_DELETE_SUCCESS;

                return result;
            }
            catch (Exception exception)
            {
                result.IsSuccess = false;
                result.ObjectRecordId = dictionaryId;
                result.ResultCode = SymbolicConstant.RESULTCODE_DELETE_ERROR;
                result.ResultMessage = exception.Message;

                return result;
            }
        }
开发者ID:ZeeMenng,项目名称:HealthManagement,代码行数:33,代码来源:DictionaryBll.cs


示例18: DeleteAll

        /// <summary>
        /// 删除数据库CardUser表中的所有记录
        /// </summary>
        /// <returns>删除结果,包括是删除成功、删除的记录数等信息</returns>
        public static ResultModel DeleteAll()
        {
            OperationLog log = new OperationLog();
            ResultModel result = new ResultModel();
            try
            {
                log.AddTime = DateTime.Now;
                log.IsSuccessId = SymbolicConstant.ISSUCCESS_TRUE;
                log.OperationLogId = System.Guid.NewGuid().ToString("N");
                log.OperationContent = SymbolicConstant.OPERATIONCONTENT_DELETEALL;
                log.OperationTable = typeof(CardUser).Name;
                log.OperationTypeCode = SymbolicConstant.OPERATIONTYPE_DELETEALL;
                log.ResultCode = SymbolicConstant.RESULTCODE_DELETEALL_SUCCESS;
                log.ResultMessage=SymbolicConstant.RESULTMESSAGE_DELETEALL_SUCCESS;
                log.UserId = CurrentSession.getUser().UserId;

                //删除的记录数
                int  count=(int)WebPageDal.DeleteAll();

                log.TotalCount = count;
                result.DataSize = count;
                result.IsSuccess = true;
                result.ResultCode =  SymbolicConstant.RESULTCODE_DELETEALL_SUCCESS;
                result.ResultMessage=SymbolicConstant.RESULTMESSAGE_DELETEALL_SUCCESS;

                return result;
            }
            catch (Exception exception)
            {
                log.IsSuccessId = SymbolicConstant.ISSUCCESS_FALSE;
                log.ResultCode = SymbolicConstant.RESULTCODE_DELETEALL_ERROR;
                log.ResultMessage=exception.Message;

                result.IsSuccess = false;
                result.ResultCode = SymbolicConstant.RESULTCODE_DELETEALL_ERROR;
                result.ResultMessage = exception.Message;

                return result;
            }
            finally
            {
                OperationLogBll.Insert(log);
            }
        }
开发者ID:ZeeMenng,项目名称:HealthManagement,代码行数:48,代码来源:CardUserBll.cs


示例19: Delete

        /// <summary>
        /// 根据记录主键,删除指定记录。
        /// </summary>
        /// <param name="userId">记录主键</param>
        /// <param name="isLog">是否写入日志</param>
        /// <returns>删除结果,包括是否删除成功、记录主键等信息</returns>
        public static ResultModel Delete(string hospitalSectionOfficeId, bool isLog)
        {
            if (isLog)
                return Delete(hospitalSectionOfficeId);
            ResultModel result = new ResultModel();
            try
            {
                HospitalSectionOffice hospitalSectionOffice =(HospitalSectionOffice)GetHospitalSectionOfficeById(hospitalSectionOfficeId).Data;
                HospitalSectionOfficeDal.Delete(hospitalSectionOffice);

                result.IsSuccess = true;
                result.ObjectRecordId = hospitalSectionOfficeId;
                result.ResultCode = SymbolicConstant.RESULTCODE_DELETE_SUCCESS;
                result.ResultMessage = SymbolicConstant.RESULTMESSAGE_DELETE_SUCCESS;

                return result;
            }
            catch (Exception exception)
            {
                result.IsSuccess = false;
                result.ObjectRecordId = hospitalSectionOfficeId;
                result.ResultCode = SymbolicConstant.RESULTCODE_DELETE_ERROR;
                result.ResultMessage = exception.Message;

                return result;
            }
        }
开发者ID:ZeeMenng,项目名称:HealthManagement,代码行数:33,代码来源:HospitalSectionOfficeBll.cs


示例20: Update

        /// <summary>
        /// 修改某条记录
        /// </summary>
        /// <param name="user">要修改记录对应的实体</param>
        /// <param name="isLog">是否写入日志</param>
        /// <returns>修改结果,包括是否修改成功、记录主键等信息</returns>
        public static ResultModel Update(CardUser cardUser, bool isLog)
        {
            if (isLog)
                return Update(cardUser);

            ResultModel result = new ResultModel();

            try
            {
                CardUserDal.Update(cardUser);

                result.IsSuccess = true;
                result.ObjectRecordId = cardUser.CardId;
                result.ResultCode = SymbolicConstant.RESULTCODE_UPDATE_SUCCESS;
                result.ResultMessage = SymbolicConstant.RESULTMESSAGE_UPDATE_SUCCESS;

                return result;
            }
            catch (Exception exception)
            {
                result.IsSuccess = false;
                result.ObjectRecordId =cardUser.CardId;
                result.ResultCode = SymbolicConstant.RESULTCODE_UPDATE_ERROR;
                result.ResultMessage = exception.Message;

                return result;
            }
        }
开发者ID:ZeeMenng,项目名称:HealthManagement,代码行数:34,代码来源:CardUserBll.cs



注:本文中的HelMagUtility.ResultModel类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Wpf.MeshBuilder类代码示例发布时间:2022-05-26
下一篇:
C# HelMagEntity.OperationLog类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap