/// <summary> /// 新增 /// </summary> /// <param name="model">角色信息实体</param> /// <returns></returns> public bool Add(EyouSoft.Model.CompanyStructure.SysRoleManage model) { if (model != null && model.RoleName == "管理员") { return(false); } bool IsTrue = false; IsTrue = idal.Add(model); #region LGWR if (IsTrue) { EyouSoft.Model.CompanyStructure.SysHandleLogs logInfo = new EyouSoft.Model.CompanyStructure.SysHandleLogs(); logInfo.CompanyId = 0; logInfo.DepatId = 0; logInfo.EventCode = EyouSoft.Model.CompanyStructure.SysHandleLogsNO.EventCode; logInfo.EventIp = string.Empty; logInfo.EventMessage = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "{0}在" + EyouSoft.Model.EnumType.CompanyStructure.SysPermissionClass.系统设置_角色管理.ToString() + "新增了角色管理信息数据。"; logInfo.EventTime = DateTime.Now; logInfo.EventTitle = "新增角色管理信息"; logInfo.ModuleId = EyouSoft.Model.EnumType.CompanyStructure.SysPermissionClass.系统设置_角色管理; logInfo.OperatorId = 0; this.Logwr(logInfo); logInfo = null; } #endregion return(IsTrue); }
/// <summary> /// 取消退票,返回1成功,其它失败 /// </summary> /// <param name="companyId">公司编号</param> /// <param name="jiPiaoGuanLiId">机票管理编号</param> /// <returns></returns> public int QuXiaoTuiPiao(int companyId, int jiPiaoGuanLiId) { if (companyId < 1 || jiPiaoGuanLiId < 1) { return(0); } if (dal.QuXiaoTuiPiao(companyId, jiPiaoGuanLiId) == 1) { EyouSoft.Model.CompanyStructure.SysHandleLogs logInfo = new EyouSoft.Model.CompanyStructure.SysHandleLogs(); logInfo.CompanyId = 0; logInfo.DepatId = 0; logInfo.EventCode = EyouSoft.Model.CompanyStructure.SysHandleLogsNO.EventCode; logInfo.EventIp = string.Empty; logInfo.EventMessage = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "{0}在" + EyouSoft.Model.EnumType.CompanyStructure.SysPermissionClass.机票管理_机票管理.ToString() + "取消退票,退票编号为:" + jiPiaoGuanLiId + "。"; logInfo.EventTime = DateTime.Now; logInfo.EventTitle = "取消退票"; logInfo.ModuleId = EyouSoft.Model.EnumType.CompanyStructure.SysPermissionClass.机票管理_机票管理; logInfo.OperatorId = 0; new EyouSoft.BLL.CompanyStructure.SysHandleLogs().Add(logInfo); return(1); } return(0); }
/// <summary> /// 取消机票审核,1:成功,-1:非审核通过状态下的机票申请不存在取消审核操作,-2:团队已提交财务不可取消审核 /// </summary> /// <param name="ticketId">机票申请编号</param> /// <returns></returns> public int QuXiaoShenHe(string ticketId) { if (string.IsNullOrEmpty(ticketId)) { return(0); } string tourId = string.Empty; int dalRetCode = dal.QuXiaoShenHe(ticketId, out tourId); if (dalRetCode == 1) { new EyouSoft.BLL.TourStructure.Tour().SetTourTicketStatus(tourId, EyouSoft.Model.EnumType.PlanStructure.TicketState.None); EyouSoft.Model.CompanyStructure.SysHandleLogs logInfo = new EyouSoft.Model.CompanyStructure.SysHandleLogs(); logInfo.CompanyId = 0; logInfo.DepatId = 0; logInfo.EventCode = EyouSoft.Model.CompanyStructure.SysHandleLogsNO.EventCode; logInfo.EventIp = string.Empty; logInfo.EventMessage = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "{0}在" + EyouSoft.Model.EnumType.CompanyStructure.SysPermissionClass.财务管理_机票审核.ToString() + "取消机票审核,机票申请编号为:" + ticketId + "。"; logInfo.EventTime = DateTime.Now; logInfo.EventTitle = "取消机票审核"; logInfo.ModuleId = EyouSoft.Model.EnumType.CompanyStructure.SysPermissionClass.财务管理_机票审核; logInfo.OperatorId = 0; new EyouSoft.BLL.CompanyStructure.SysHandleLogs().Add(logInfo); } return(dalRetCode); }
/// <summary> /// 删除酒店供应商信息 /// </summary> /// <param name="supplierId">供应商编号集合</param> /// <returns></returns> public bool DeleteHotelInfo(params int[] supplierIds) { if (supplierIds == null || supplierIds.Length < 1) { return(false); } if (new EyouSoft.BLL.CompanyStructure.SupplierBaseHandle().DeleteSupplierBase(supplierIds)) { #region LGWR StringBuilder s = new StringBuilder(); s.Append(supplierIds[0]); for (int i = 1; i < supplierIds.Length; i++) { s.AppendFormat(",{0}", supplierIds[i]); } EyouSoft.Model.CompanyStructure.SysHandleLogs logInfo = new EyouSoft.Model.CompanyStructure.SysHandleLogs(); logInfo.CompanyId = 0; logInfo.DepatId = 0; logInfo.EventCode = EyouSoft.Model.CompanyStructure.SysHandleLogsNO.EventCode; logInfo.EventIp = string.Empty; logInfo.EventMessage = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "{0}在" + EyouSoft.Model.EnumType.CompanyStructure.SysPermissionClass.供应商管理_酒店.ToString() + "删除了供应商信息,供应商编号为:" + s; logInfo.EventTime = DateTime.Now; logInfo.EventTitle = "删除供应商信息"; logInfo.ModuleId = EyouSoft.Model.EnumType.CompanyStructure.SysPermissionClass.供应商管理_酒店; logInfo.OperatorId = 0; this.Logwr(logInfo); #endregion return(true); } return(false); }
/// <summary> /// 删除开票信息,操作成功返回1 /// </summary> /// <param name="faPiaoId">发票登记编号</param> /// <returns></returns> public int Delete(string faPiaoId) { if (string.IsNullOrEmpty(faPiaoId)) { return(0); } int dalRetCode = dal.Delete(faPiaoId); if (dalRetCode == 1) { EyouSoft.Model.CompanyStructure.SysHandleLogs logInfo = new EyouSoft.Model.CompanyStructure.SysHandleLogs(); logInfo.CompanyId = 0; logInfo.DepatId = 0; logInfo.EventCode = EyouSoft.Model.CompanyStructure.SysHandleLogsNO.EventCode; logInfo.EventIp = string.Empty; logInfo.EventMessage = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "{0}在" + EyouSoft.Model.EnumType.CompanyStructure.SysPermissionClass.财务管理_发票管理.ToString() + "删除开票登记,登记编号为:" + faPiaoId; logInfo.EventTime = DateTime.Now; logInfo.EventTitle = "删除开票登记"; logInfo.ModuleId = EyouSoft.Model.EnumType.CompanyStructure.SysPermissionClass.财务管理_发票管理; logInfo.OperatorId = 0; new EyouSoft.BLL.CompanyStructure.SysHandleLogs().Add(logInfo); } return(dalRetCode); }
/// <summary> /// 批量更新客户资料责任销售 /// </summary> /// <param name="companyId">公司编号(专线)</param> /// <param name="customers">客户资料编号集合</param> /// <param name="sellerId">责任销售员编号</param> /// <param name="sellerName">责任销售员姓名</param> /// <returns></returns> public bool BatchSpecifiedSeller(int companyId, IList <int> customers, int sellerId, string sellerName) { if (companyId < 1 || customers == null || customers.Count() <= 0 || sellerId < 1) { return(false); } if (Dal.BatchSpecifiedSeller(companyId, customers, sellerId, sellerName)) { #region LGWR EyouSoft.Model.CompanyStructure.SysHandleLogs logInfo = new EyouSoft.Model.CompanyStructure.SysHandleLogs(); logInfo.CompanyId = 0; logInfo.DepatId = 0; logInfo.EventCode = EyouSoft.Model.CompanyStructure.SysHandleLogsNO.EventCode; logInfo.EventIp = string.Empty; logInfo.EventMessage = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "{0}在" + EyouSoft.Model.EnumType.CompanyStructure.SysPermissionClass.客户关系管理_客户资料.ToString() + "批量指定客户责任销售员,客户编号为:" + EyouSoft.Toolkit.Utils.GetSqlIdStrByList(customers) + "责任销售员编号为:" + sellerId; logInfo.EventTime = DateTime.Now; logInfo.EventTitle = "批量指定客户责任销售"; logInfo.ModuleId = EyouSoft.Model.EnumType.CompanyStructure.SysPermissionClass.客户关系管理_客户资料; logInfo.OperatorId = 0; new EyouSoft.BLL.CompanyStructure.SysHandleLogs().Add(logInfo); #endregion return(true); } return(false); }
/// <summary> /// 删除一条数据 /// </summary> public bool DeleteCustomer(int Id) { if (Id <= 0) { return(true); } if (Dal.DeleteCustomer(Id)) { #region LGWR EyouSoft.Model.CompanyStructure.SysHandleLogs logInfo = new EyouSoft.Model.CompanyStructure.SysHandleLogs(); logInfo.CompanyId = 0; logInfo.DepatId = 0; logInfo.EventCode = EyouSoft.Model.CompanyStructure.SysHandleLogsNO.EventCode; logInfo.EventIp = string.Empty; logInfo.EventMessage = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "{0}在" + EyouSoft.Model.EnumType.CompanyStructure.SysPermissionClass.客户关系管理_客户资料.ToString() + "删除了客户资料,客户编号为:" + Id; logInfo.EventTime = DateTime.Now; logInfo.EventTitle = "删除客户资料"; logInfo.ModuleId = EyouSoft.Model.EnumType.CompanyStructure.SysPermissionClass.客户关系管理_客户资料; logInfo.OperatorId = 0; new EyouSoft.BLL.CompanyStructure.SysHandleLogs().Add(logInfo); #endregion return(true); } return(false); }
/// <summary> /// 专线端修改报价 /// </summary> /// <param name="LineInquireQuoteInfo"></param> /// <returns></returns> public bool UpdateQuote(EyouSoft.Model.TourStructure.LineInquireQuoteInfo LineInquireQuoteInfo) { if (LineInquireQuoteInfo.CompanyId == 0 || LineInquireQuoteInfo.Id == 0) { return(false); } LineInquireQuoteInfo.QuoteState = EyouSoft.Model.EnumType.TourStructure.QuoteState.已处理; if (dal.UpdateQuote(LineInquireQuoteInfo)) { #region LGWR EyouSoft.Model.CompanyStructure.SysHandleLogs logInfo = new EyouSoft.Model.CompanyStructure.SysHandleLogs(); logInfo.CompanyId = 0; logInfo.DepatId = 0; logInfo.EventCode = EyouSoft.Model.CompanyStructure.SysHandleLogsNO.EventCode; logInfo.EventIp = string.Empty; logInfo.EventMessage = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "{0}在" + EyouSoft.Model.EnumType.CompanyStructure.SysPermissionClass.团队计划_组团社询价.ToString() + "添加了一条报价,编号:" + LineInquireQuoteInfo.Id; logInfo.EventTime = DateTime.Now; logInfo.EventTitle = "添加报价"; logInfo.ModuleId = EyouSoft.Model.EnumType.CompanyStructure.SysPermissionClass.团队计划_组团社询价; logInfo.OperatorId = 0; this.Logwr(logInfo); return(true); #endregion } return(false); }
/// <summary> /// 删除散客天天发计划信息,正值时成功,负值或0时失败 /// </summary> /// <param name="tourId">天天发计划编号</param> /// <returns></returns> public int DeleteTourEverydayInfo(string tourId) { if (string.IsNullOrEmpty(tourId)) { return(0); } int dalExceptionCode = dal.DeleteTourEverydayInfo(tourId); if (dalExceptionCode <= 0) { return(dalExceptionCode); } #region LGWR EyouSoft.Model.CompanyStructure.SysHandleLogs logInfo = new EyouSoft.Model.CompanyStructure.SysHandleLogs(); logInfo.CompanyId = 0; logInfo.DepatId = 0; logInfo.EventCode = EyouSoft.Model.CompanyStructure.SysHandleLogsNO.EventCode; logInfo.EventIp = string.Empty; logInfo.EventMessage = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "{0}在" + EyouSoft.Model.EnumType.CompanyStructure.SysPermissionClass.散拼计划_散客天天发.ToString() + "删除了散客天天发计划数据,计划编号为:" + tourId; logInfo.EventTime = DateTime.Now; logInfo.EventTitle = "删除散客天天发计划"; logInfo.ModuleId = EyouSoft.Model.EnumType.CompanyStructure.SysPermissionClass.散拼计划_散客天天发; logInfo.OperatorId = 0; this.Logwr(logInfo); #endregion return(dalExceptionCode); }
/// <summary> /// 专线端添加报价并生成团队计划 /// </summary> /// <param name="info">团队计划列表信息业务实体</param> /// <param name="LineInquireQuoteInfo">线路询价报价实体类</param> /// <returns></returns> public bool AddQuote(EyouSoft.Model.TourStructure.TourTeamInfo info, EyouSoft.Model.TourStructure.LineInquireQuoteInfo LineInquireQuoteInfo) { if (LineInquireQuoteInfo.CompanyId == 0 || LineInquireQuoteInfo.Id == 0) { return(false); } if (QuoteSuccessInsertPlan(LineInquireQuoteInfo.Id, info)) { //同步组团询价游客信息到团队计划订单 dal.SyncQuoteTravellerToTourTeamOrder(LineInquireQuoteInfo.Id, info.TourId); LineInquireQuoteInfo.QuoteState = EyouSoft.Model.EnumType.TourStructure.QuoteState.已成功; if (dal.UpdateQuote(LineInquireQuoteInfo)) { #region LGWR EyouSoft.Model.CompanyStructure.SysHandleLogs logInfo = new EyouSoft.Model.CompanyStructure.SysHandleLogs(); logInfo.CompanyId = 0; logInfo.DepatId = 0; logInfo.EventCode = EyouSoft.Model.CompanyStructure.SysHandleLogsNO.EventCode; logInfo.EventIp = string.Empty; logInfo.EventMessage = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "{0}在" + EyouSoft.Model.EnumType.CompanyStructure.SysPermissionClass.团队计划_组团社询价.ToString() + "添加了一条报价,编号:" + LineInquireQuoteInfo.Id; logInfo.EventTime = DateTime.Now; logInfo.EventTitle = "添加报价"; logInfo.ModuleId = EyouSoft.Model.EnumType.CompanyStructure.SysPermissionClass.团队计划_组团社询价; logInfo.OperatorId = 0; this.Logwr(logInfo); return(true); #endregion } } return(false); }
/// <summary> /// 获取操作日志实体 /// </summary> /// <param name="id">主键编号</param> /// <returns>操作日志实体</returns> public EyouSoft.Model.CompanyStructure.SysHandleLogs GetModel(string id) { EyouSoft.Model.CompanyStructure.SysHandleLogs sysHandleLogsModel = null; DbCommand cmd = this._db.GetSqlStringCommand(SQL_SELECT_SysHandleLogs); this._db.AddInParameter(cmd, "ID", DbType.String, id); using (IDataReader rdr = EyouSoft.Toolkit.DAL.DbHelper.ExecuteReader(cmd, this._db)) { if (rdr.Read()) { sysHandleLogsModel = new EyouSoft.Model.CompanyStructure.SysHandleLogs(); sysHandleLogsModel.ID = rdr.GetString(rdr.GetOrdinal("ID")); sysHandleLogsModel.OperatorId = rdr.GetInt32(rdr.GetOrdinal("OperatorId")); sysHandleLogsModel.DepatId = rdr.GetInt32(rdr.GetOrdinal("DepatId")); sysHandleLogsModel.CompanyId = rdr.GetInt32(rdr.GetOrdinal("CompanyId")); sysHandleLogsModel.ModuleId = (EyouSoft.Model.EnumType.CompanyStructure.SysPermissionClass)rdr.GetInt32(rdr.GetOrdinal("ModuleId")); sysHandleLogsModel.EventCode = rdr.GetInt32(rdr.GetOrdinal("EventCode")); sysHandleLogsModel.EventMessage = rdr.GetString(rdr.GetOrdinal("EventMessage")); sysHandleLogsModel.EventTitle = rdr.GetString(rdr.GetOrdinal("EventTitle")); sysHandleLogsModel.EventTime = rdr.GetDateTime(rdr.GetOrdinal("EventTime")); sysHandleLogsModel.EventIp = rdr.GetString(rdr.GetOrdinal("EventIp")); sysHandleLogsModel.OperatorName = rdr.IsDBNull(rdr.GetOrdinal("UserName")) ? "" : rdr.GetString(rdr.GetOrdinal("UserName")); sysHandleLogsModel.DepartName = rdr.IsDBNull(rdr.GetOrdinal("DepartName")) ? "" : rdr.GetString(rdr.GetOrdinal("DepartName")); } } return(sysHandleLogsModel); }
/// <summary> /// 审核收款,返回1成功,其它失败 /// </summary> /// <param name="dengJiId">登记编号</param> /// <param name="orderId">订单编号</param> /// <param name="companyId">公司编号</param> /// <param name="operatorId">审核人编号</param> /// <returns></returns> public int ShenHeShouKuan(string dengJiId, string orderId, int companyId, int operatorId) { if (string.IsNullOrEmpty(dengJiId) || string.IsNullOrEmpty(orderId) || companyId < 1 || operatorId < 1) { return(0); } int dalRetCode = dal.ShenHeShouKuan(dengJiId, operatorId); if (dalRetCode == 1) { EyouSoft.BLL.UtilityStructure.Utility utilityBll = new EyouSoft.BLL.UtilityStructure.Utility(); utilityBll.UpdateCheckMoney(true, orderId); utilityBll.CalculationCashFlow(companyId, DateTime.Today); utilityBll = null; #region LGWR EyouSoft.Model.CompanyStructure.SysHandleLogs logInfo = new EyouSoft.Model.CompanyStructure.SysHandleLogs(); logInfo.CompanyId = 0; logInfo.DepatId = 0; logInfo.EventCode = EyouSoft.Model.CompanyStructure.SysHandleLogsNO.EventCode; logInfo.EventIp = string.Empty; logInfo.EventMessage = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "{0}在" + EyouSoft.Model.EnumType.CompanyStructure.SysPermissionClass.财务管理_团款收入.ToString() + "审核收款,收款登记编号为:" + dengJiId; logInfo.EventTime = DateTime.Now; logInfo.EventTitle = "审核收款"; logInfo.ModuleId = EyouSoft.Model.EnumType.CompanyStructure.SysPermissionClass.财务管理_团款收入; logInfo.OperatorId = 0; new EyouSoft.BLL.CompanyStructure.SysHandleLogs().Add(logInfo); #endregion } return(dalRetCode); }
/// <summary> /// 设置系统配置信息 /// </summary> /// <param name="model">系统配置实体</param> /// <returns>true:成功 false:失败</returns> public bool SetCompanySetting(EyouSoft.Model.CompanyStructure.CompanyFieldSetting model) { bool dalResult = Dal.SetCompanySetting(model); if (dalResult) { EyouSoft.Cache.Facade.EyouSoftCache.Remove(string.Format(EyouSoft.Cache.Tag.Company.CompanyConfig, model.CompanyId)); #region LGWR EyouSoft.Model.CompanyStructure.SysHandleLogs logInfo = new EyouSoft.Model.CompanyStructure.SysHandleLogs(); logInfo.CompanyId = 0; logInfo.DepatId = 0; logInfo.EventCode = EyouSoft.Model.CompanyStructure.SysHandleLogsNO.EventCode; logInfo.EventIp = string.Empty; logInfo.EventMessage = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "{0}在" + EyouSoft.Model.EnumType.CompanyStructure.SysPermissionClass.系统设置_系统配置.ToString() + "更新了系统配置信息。"; logInfo.EventTime = DateTime.Now; logInfo.EventTitle = "更新系统配置"; logInfo.ModuleId = EyouSoft.Model.EnumType.CompanyStructure.SysPermissionClass.系统设置_系统配置; logInfo.OperatorId = 0; new EyouSoft.BLL.CompanyStructure.SysHandleLogs().Add(logInfo); #endregion } return(dalResult); }
/// <summary> /// 删除询价报价记录 /// </summary> /// <param name="Ids"></param> /// <returns></returns> public bool DelInquire(int CompanyId, params int[] Ids) { if (Ids == null || Ids.Length <= 0) { return(false); } string strIds = string.Empty; foreach (int str in Ids) { strIds += str.ToString().Trim() + ","; } strIds = strIds.Trim(','); if (dal.DelInquire(CompanyId, strIds)) { #region LGWR EyouSoft.Model.CompanyStructure.SysHandleLogs logInfo = new EyouSoft.Model.CompanyStructure.SysHandleLogs(); logInfo.CompanyId = 0; logInfo.DepatId = 0; logInfo.EventCode = EyouSoft.Model.CompanyStructure.SysHandleLogsNO.EventCode; logInfo.EventIp = string.Empty; logInfo.EventMessage = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "{0}在" + EyouSoft.Model.EnumType.CompanyStructure.SysPermissionClass.团队计划_组团社询价.ToString() + "删除了一条报价,编号:" + strIds; logInfo.EventTime = DateTime.Now; logInfo.EventTitle = "删除报价"; logInfo.ModuleId = EyouSoft.Model.EnumType.CompanyStructure.SysPermissionClass.团队计划_组团社询价; logInfo.OperatorId = 0; this.Logwr(logInfo); return(true); #endregion } return(false); }
/// <summary> /// 添加日志记录 /// </summary> /// <param name="actionName">操作名称</param> /// <param name="flag">操作状态</param> /// <returns></returns> private EyouSoft.Model.CompanyStructure.SysHandleLogs AddLogs(string actionName , EyouSoft.Model.EnumType.CompanyStructure.SupplierType?SupplierType, bool flag) { EyouSoft.Model.EnumType.CompanyStructure.SysPermissionClass sp = EyouSoft.Model.EnumType.CompanyStructure.SysPermissionClass.供应商管理_其它; if (SupplierType.HasValue) { switch (SupplierType) { case EyouSoft.Model.EnumType.CompanyStructure.SupplierType.其他: sp = EyouSoft.Model.EnumType.CompanyStructure.SysPermissionClass.供应商管理_其它; break; case EyouSoft.Model.EnumType.CompanyStructure.SupplierType.航空公司: sp = EyouSoft.Model.EnumType.CompanyStructure.SysPermissionClass.供应商管理_航空公司; break; } } EyouSoft.Model.CompanyStructure.SysHandleLogs model = new EyouSoft.Model.CompanyStructure.SysHandleLogs(); model.ModuleId = sp; model.EventCode = Model.CompanyStructure.SysHandleLogsNO.EventCode; model.EventMessage = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "{0}在" + sp.ToString() + (flag ? actionName : actionName + "失败") + "了供应商" + (SupplierType.HasValue ? SupplierType.ToString() : string.Empty) + "数据"; model.EventTitle = (flag ? actionName : actionName + "失败") + sp.ToString() + "数据"; return(model); }
/// <summary> /// 登记开票信息,操作成功返回1 /// </summary> /// <param name="info">开票信息业务实体</param> /// <returns></returns> public int Insert(EyouSoft.Model.FinanceStructure.MFaPiaoInfo info) { if (info == null || info.CompanyId < 1 || info.CrmId < 1) { return(0); } info.Id = Guid.NewGuid().ToString(); int dalRetCode = dal.Insert(info); if (dalRetCode == 1) { EyouSoft.Model.CompanyStructure.SysHandleLogs logInfo = new EyouSoft.Model.CompanyStructure.SysHandleLogs(); logInfo.CompanyId = 0; logInfo.DepatId = 0; logInfo.EventCode = EyouSoft.Model.CompanyStructure.SysHandleLogsNO.EventCode; logInfo.EventIp = string.Empty; logInfo.EventMessage = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "{0}在" + EyouSoft.Model.EnumType.CompanyStructure.SysPermissionClass.财务管理_发票管理.ToString() + "新增开票登记,登记编号为:" + info.Id; logInfo.EventTime = DateTime.Now; logInfo.EventTitle = "新增开票登记"; logInfo.ModuleId = EyouSoft.Model.EnumType.CompanyStructure.SysPermissionClass.财务管理_发票管理; logInfo.OperatorId = 0; new EyouSoft.BLL.CompanyStructure.SysHandleLogs().Add(logInfo); } return(dalRetCode); }
/// <summary> /// 安排地接 /// </summary> /// <param name="model"></param> /// <returns></returns> public bool AddTravel(LocalTravelAgencyInfo model) { string id = Guid.NewGuid().ToString(); model.ID = id; model.TotalAmount = model.Settlement; if (dal.RanguageTravel(model)) { //添加支出明细 AddStatAllOut(model); //重新计算团队支出 EyouSoft.BLL.UtilityStructure.Utility u = new EyouSoft.BLL.UtilityStructure.Utility(); IList <EyouSoft.Model.StatisticStructure.ItemIdAndType> iList = new List <EyouSoft.Model.StatisticStructure.ItemIdAndType>(); iList.Add(new EyouSoft.Model.StatisticStructure.ItemIdAndType() { ItemId = model.ID, ItemType = EyouSoft.Model.EnumType.StatisticStructure.PaidType.地接支出 }); //价格维护 u.CalculationTourOut(model.TourId, iList); //加日志 //AddSysLog("新增"); //维护地接社交易数量 if (model.TravelAgencyID > 0) { u.ServerTradeCount(model.TravelAgencyID); } u.CalculationTourSettleStatus(model.TourId); #region LGWR EyouSoft.Model.EnumType.TourStructure.TourType? tourType = new EyouSoft.BLL.TourStructure.Tour().GetTourType(model.TourId); Model.EnumType.CompanyStructure.SysPermissionClass mokuai = EyouSoft.Model.EnumType.CompanyStructure.SysPermissionClass.散拼计划_散拼计划; if (tourType != null && tourType == EyouSoft.Model.EnumType.TourStructure.TourType.团队计划) { mokuai = EyouSoft.Model.EnumType.CompanyStructure.SysPermissionClass.团队计划_团队计划; } EyouSoft.Model.CompanyStructure.SysHandleLogs logInfo = new EyouSoft.Model.CompanyStructure.SysHandleLogs(); logInfo.CompanyId = 0; logInfo.DepatId = 0; logInfo.EventCode = EyouSoft.Model.CompanyStructure.SysHandleLogsNO.EventCode; logInfo.EventIp = string.Empty; logInfo.EventMessage = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "{0}在" + mokuai.ToString() + "新增了地接安排,安排编号:" + model.ID + ",计划编号为:" + model.TourId; logInfo.EventTime = DateTime.Now; logInfo.EventTitle = "新增地接安排"; logInfo.ModuleId = mokuai; logInfo.OperatorId = 0; this.Logwr(logInfo); #endregion return(true); } return(false); }
/// <summary> /// 添加日志记录 /// </summary> /// <param name="actionName">操作名称</param> /// <param name="flag">操作状态</param> /// <returns></returns> private EyouSoft.Model.CompanyStructure.SysHandleLogs AddLogs(string actionName, bool flag) { EyouSoft.Model.CompanyStructure.SysHandleLogs model = new EyouSoft.Model.CompanyStructure.SysHandleLogs(); model.ModuleId = EyouSoft.Model.EnumType.CompanyStructure.SysPermissionClass.系统设置_组织机构; model.EventCode = Model.CompanyStructure.SysHandleLogsNO.EventCode; model.EventMessage = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "{0}在" + Model.EnumType.CompanyStructure.SysPermissionClass.系统设置_组织机构.ToString() + (flag ? actionName : actionName + "失败") + "了部门人员数据"; model.EventTitle = (flag ? actionName : actionName + "失败") + Model.EnumType.CompanyStructure.SysPermissionClass.系统设置_组织机构.ToString() + "数据"; return(model); }
/// <summary> /// 分页获取操作日志列表 /// </summary> /// <param name="pageSize">每页现实条数</param> /// <param name="pageIndex">当前页码</param> /// <param name="RecordCount">总记录数</param> /// <param name="model">系统操作日志查询实体</param> /// <returns></returns> public IList <EyouSoft.Model.CompanyStructure.SysHandleLogs> GetList(int pageSize, int pageIndex, ref int RecordCount, EyouSoft.Model.CompanyStructure.QueryHandleLog model) { IList <EyouSoft.Model.CompanyStructure.SysHandleLogs> totals = new List <EyouSoft.Model.CompanyStructure.SysHandleLogs>(); string tableName = "View_SysHandleLogs"; string primaryKey = "ID"; string orderByString = "EventTime DESC"; string fields = " Id, OperatorId, DepatId, CompanyId, ModuleId,EventCode,EventMessage,EventTitle,EventTime,EventIp,UserName,DepartName"; StringBuilder cmdQuery = new StringBuilder(); cmdQuery.AppendFormat(" CompanyId = {0}", model.CompanyId); if (model.DepartId > 0) { cmdQuery.AppendFormat(" and DepatId={0}", model.DepartId); } if (model.OperatorId > 0) { cmdQuery.AppendFormat(" and OperatorId={0}", model.OperatorId); } if (model.HandStartTime != null) { cmdQuery.AppendFormat(" and EventTime >= '{0}'", model.HandStartTime); } if (model.HandEndTime != null) { cmdQuery.AppendFormat(" and EventTime <= '{0}' ", model.HandEndTime); } using (IDataReader rdr = EyouSoft.Toolkit.DAL.DbHelper.ExecuteReader(this._db, pageSize, pageIndex, ref RecordCount, tableName, primaryKey, fields, cmdQuery.ToString(), orderByString)) { while (rdr.Read()) { EyouSoft.Model.CompanyStructure.SysHandleLogs sysHandleLogsInfo = new EyouSoft.Model.CompanyStructure.SysHandleLogs(); sysHandleLogsInfo.ID = rdr.GetString(rdr.GetOrdinal("ID")); sysHandleLogsInfo.OperatorId = rdr.GetInt32(rdr.GetOrdinal("OperatorId")); sysHandleLogsInfo.DepatId = rdr.GetInt32(rdr.GetOrdinal("DepatId")); sysHandleLogsInfo.CompanyId = rdr.GetInt32(rdr.GetOrdinal("CompanyId")); sysHandleLogsInfo.ModuleId = (EyouSoft.Model.EnumType.CompanyStructure.SysPermissionClass)rdr.GetInt32(rdr.GetOrdinal("ModuleId")); sysHandleLogsInfo.EventCode = rdr.GetInt32(rdr.GetOrdinal("EventCode")); sysHandleLogsInfo.EventMessage = rdr.GetString(rdr.GetOrdinal("EventMessage")); sysHandleLogsInfo.EventTitle = rdr.GetString(rdr.GetOrdinal("EventTitle")); sysHandleLogsInfo.EventTime = rdr.GetDateTime(rdr.GetOrdinal("EventTime")); sysHandleLogsInfo.EventIp = rdr.GetString(rdr.GetOrdinal("EventIp")); sysHandleLogsInfo.OperatorName = rdr.GetString(rdr.GetOrdinal("UserName")); sysHandleLogsInfo.DepartName = rdr.GetString(rdr.GetOrdinal("DepartName")); totals.Add(sysHandleLogsInfo); } } return(totals); }
/// <summary> /// 添加日志 /// </summary> /// <param name="?"></param> /// <returns></returns> private bool AddSysLog(string type) { EyouSoft.BLL.CompanyStructure.SysHandleLogs sysLong = new EyouSoft.BLL.CompanyStructure.SysHandleLogs(); EyouSoft.Model.CompanyStructure.SysHandleLogs sysModel = new EyouSoft.Model.CompanyStructure.SysHandleLogs(); sysModel.EventMessage = System.DateTime.Now.ToString() + "{0}在机票管理" + type + "了出票"; sysModel.EventTitle = type + " 机票管理"; sysModel.ID = Guid.NewGuid().ToString(); sysModel.EventCode = Model.CompanyStructure.SysHandleLogsNO.EventCode; sysModel.ModuleId = Model.EnumType.CompanyStructure.SysPermissionClass.机票管理_机票管理; return(sysLong.Add(sysModel)); }
/// <summary> /// 修改地接 /// </summary> /// <param name="Model"></param> /// <returns></returns> public bool UpdateTravelAgency(EyouSoft.Model.PlanStructure.LocalTravelAgencyInfo Model) { if (dal.UpdateTravelModel(Model)) { //重新计算团队支出 EyouSoft.BLL.UtilityStructure.Utility u = new EyouSoft.BLL.UtilityStructure.Utility(); IList <EyouSoft.Model.StatisticStructure.ItemIdAndType> iList = new List <EyouSoft.Model.StatisticStructure.ItemIdAndType>(); iList.Add(new EyouSoft.Model.StatisticStructure.ItemIdAndType() { ItemId = Model.ID, ItemType = EyouSoft.Model.EnumType.StatisticStructure.PaidType.地接支出 }); //价格维护 u.CalculationTourOut(Model.TourId, iList); //加日志 //AddSysLog("修改"); //维护地接社交易数量 if (Model.TravelAgencyID > 0) { EyouSoft.Model.PlanStructure.LocalTravelAgencyInfo tempModel = GetTravelModel(Model.ID); if (tempModel != null) { u.ServerTradeCount(new int[] { Model.TravelAgencyID, tempModel.TravelAgencyID }); } } u.CalculationTourSettleStatus(Model.TourId); #region LGWR EyouSoft.Model.EnumType.TourStructure.TourType? tourType = new EyouSoft.BLL.TourStructure.Tour().GetTourType(Model.TourId); Model.EnumType.CompanyStructure.SysPermissionClass mokuai = EyouSoft.Model.EnumType.CompanyStructure.SysPermissionClass.散拼计划_散拼计划; if (tourType != null && tourType == EyouSoft.Model.EnumType.TourStructure.TourType.团队计划) { mokuai = EyouSoft.Model.EnumType.CompanyStructure.SysPermissionClass.团队计划_团队计划; } EyouSoft.Model.CompanyStructure.SysHandleLogs logInfo = new EyouSoft.Model.CompanyStructure.SysHandleLogs(); logInfo.CompanyId = 0; logInfo.DepatId = 0; logInfo.EventCode = EyouSoft.Model.CompanyStructure.SysHandleLogsNO.EventCode; logInfo.EventIp = string.Empty; logInfo.EventMessage = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "{0}在" + mokuai.ToString() + "修改了地接安排,安排编号:" + Model.ID + ",计划编号为:" + Model.TourId; logInfo.EventTime = DateTime.Now; logInfo.EventTitle = "修改地接安排"; logInfo.ModuleId = mokuai; logInfo.OperatorId = 0; this.Logwr(logInfo); #endregion return(true); } return(false); }
/// <summary> /// 写入散客天天发计划信息,正值时成功,负值或0时失败 /// </summary> /// <param name="info">散客天天发计划信息业务实体</param> /// <returns></returns> public int InsertTourEverydayInfo(EyouSoft.Model.TourStructure.TourEverydayInfo info) { if (info == null) { return(0); } if (info.CompanyId < 0) { return(-1); } if (info.AreaId < 1) { return(-2); } if (info.TourDays < 1) { return(-3); } if (info.OperatorId < 1) { return(-4); } if (info.PriceStandards == null) { return(-5); } info.TourId = Guid.NewGuid().ToString(); info.CreateTime = DateTime.Now; int dalExceptionCode = dal.InsertTourEverydayInfo(info); if (dalExceptionCode <= 0) { return(dalExceptionCode); } #region LGWR EyouSoft.Model.CompanyStructure.SysHandleLogs logInfo = new EyouSoft.Model.CompanyStructure.SysHandleLogs(); logInfo.CompanyId = 0; logInfo.DepatId = 0; logInfo.EventCode = EyouSoft.Model.CompanyStructure.SysHandleLogsNO.EventCode; logInfo.EventIp = string.Empty; logInfo.EventMessage = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "{0}在" + EyouSoft.Model.EnumType.CompanyStructure.SysPermissionClass.散拼计划_散客天天发.ToString() + "新增了散客天天发计划数据,计划编号为:" + info.TourId; logInfo.EventTime = DateTime.Now; logInfo.EventTitle = "添加散客天天发计划"; logInfo.ModuleId = EyouSoft.Model.EnumType.CompanyStructure.SysPermissionClass.散拼计划_散客天天发; logInfo.OperatorId = 0; this.Logwr(logInfo); #endregion return(dalExceptionCode); }
/// <summary> /// 删除地接 /// </summary> /// <param name="TravelId">安排地接编号</param> /// <returns></returns> public bool DelTravelAgency(string TravelId) { EyouSoft.Model.PlanStructure.LocalTravelAgencyInfo modelTravel = GetTravelModel(TravelId); if (dal.DeletTravelModel(TravelId)) { //加日志 //AddSysLog("删除"); //维护地接社交易数量 if (modelTravel != null) { EyouSoft.BLL.CompanyStructure.CompanySupplier bllSuplier = new EyouSoft.BLL.CompanyStructure.CompanySupplier();// EyouSoft.BLL.CompanyStructure.CompanySupplier(); EyouSoft.Model.CompanyStructure.CompanySupplier Model = bllSuplier.GetModel(modelTravel.TravelAgencyID, modelTravel.CompanyId); if (Model != null && Model.Id > 0) { EyouSoft.BLL.UtilityStructure.Utility idal = new EyouSoft.BLL.UtilityStructure.Utility(); idal.ServerTradeCount(new int[] { Model.Id }); } //重新计算团队支出 EyouSoft.BLL.UtilityStructure.Utility u = new EyouSoft.BLL.UtilityStructure.Utility(); //价格维护 u.CalculationTourOut(modelTravel.TourId, null); #region LGWR EyouSoft.Model.EnumType.TourStructure.TourType? tourType = new EyouSoft.BLL.TourStructure.Tour().GetTourType(modelTravel.TourId); Model.EnumType.CompanyStructure.SysPermissionClass mokuai = EyouSoft.Model.EnumType.CompanyStructure.SysPermissionClass.散拼计划_散拼计划; if (tourType != null && tourType == EyouSoft.Model.EnumType.TourStructure.TourType.团队计划) { mokuai = EyouSoft.Model.EnumType.CompanyStructure.SysPermissionClass.团队计划_团队计划; } EyouSoft.Model.CompanyStructure.SysHandleLogs logInfo = new EyouSoft.Model.CompanyStructure.SysHandleLogs(); logInfo.CompanyId = 0; logInfo.DepatId = 0; logInfo.EventCode = EyouSoft.Model.CompanyStructure.SysHandleLogsNO.EventCode; logInfo.EventIp = string.Empty; logInfo.EventMessage = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "{0}在" + mokuai.ToString() + "删除了地接安排,安排编号:" + modelTravel.ID + ",计划编号为:" + modelTravel.TourId; logInfo.EventTime = DateTime.Now; logInfo.EventTitle = "删除地接安排"; logInfo.ModuleId = mokuai; logInfo.OperatorId = 0; this.Logwr(logInfo); #endregion return(true); } } return(false); }
/// <summary> /// 添加操作日志 /// </summary> /// <param name="model">系统操作日志实体</param> /// <returns>true:成功 false:失败</returns> public bool Add(EyouSoft.Model.CompanyStructure.SysHandleLogs model) { DbCommand cmd = this._db.GetSqlStringCommand(SQL_INSERT_SysHandleLogs); this._db.AddInParameter(cmd, "ID", DbType.AnsiStringFixedLength, Guid.NewGuid().ToString()); this._db.AddInParameter(cmd, "OperatorId", DbType.Int32, model.OperatorId); this._db.AddInParameter(cmd, "DepatId", DbType.Int32, model.DepatId); this._db.AddInParameter(cmd, "CompanyId", DbType.Int32, model.CompanyId); this._db.AddInParameter(cmd, "ModuleId", DbType.Int32, (int)model.ModuleId); this._db.AddInParameter(cmd, "EventCode", DbType.Int32, model.EventCode); this._db.AddInParameter(cmd, "EventMessage", DbType.String, model.EventMessage); this._db.AddInParameter(cmd, "EventTitle", DbType.String, model.EventTitle); this._db.AddInParameter(cmd, "EventIp", DbType.String, model.EventIp); return(EyouSoft.Toolkit.DAL.DbHelper.ExecuteSql(cmd, this._db) > 0 ? true : false); }
/// <summary> /// 散客天天发计划生成散拼计划,正值时成功,负值或0时失败 /// </summary> /// <param name="tourInfo">散拼计划信息业务实体</param> /// <param name="everydayTourId">天天发计划编号</param> /// <param name="everydayTourApplyId">天天发计划申请编号</param> /// <returns></returns> public int BuildTour(EyouSoft.Model.TourStructure.TourInfo tourInfo, string everydayTourId, string everydayTourApplyId) { int insertTourResult = 0, dalExceptionCode = 0, buyerCompanyId = 0; string buildTourId = string.Empty; EyouSoft.BLL.TourStructure.Tour tourbll = new Tour(); insertTourResult = tourbll.InsertTourInfo(tourInfo); tourbll = null; if (insertTourResult > 0) { buildTourId = tourInfo.Childrens[0].ChildrenId; dalExceptionCode = dal.BuildTourFollow(buildTourId, everydayTourId, everydayTourApplyId, out buyerCompanyId); } else { return(-109); } if (dalExceptionCode <= 0) { return(dalExceptionCode); } #region stat. EyouSoft.BLL.UtilityStructure.Utility utilitybll = new EyouSoft.BLL.UtilityStructure.Utility(); utilitybll.UpdateTradeNum(new int[] { buyerCompanyId }); utilitybll = null; #endregion #region LGWR EyouSoft.Model.CompanyStructure.SysHandleLogs logInfo = new EyouSoft.Model.CompanyStructure.SysHandleLogs(); logInfo.CompanyId = 0; logInfo.DepatId = 0; logInfo.EventCode = EyouSoft.Model.CompanyStructure.SysHandleLogsNO.EventCode; logInfo.EventIp = string.Empty; logInfo.EventMessage = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "{0}在" + EyouSoft.Model.EnumType.CompanyStructure.SysPermissionClass.散拼计划_散客天天发.ToString() + "生成计划,生成的散拼计划编号为:" + buildTourId + ",天天发计划申请编号为:" + everydayTourApplyId + ",天天发计划编号为:" + everydayTourId; logInfo.EventTime = DateTime.Now; logInfo.EventTitle = "散客天天发计划生成散拼计划"; logInfo.ModuleId = EyouSoft.Model.EnumType.CompanyStructure.SysPermissionClass.散拼计划_散客天天发; logInfo.OperatorId = 0; this.Logwr(logInfo); #endregion return(dalExceptionCode); }
/// <summary> /// 批量登记付款 /// </summary> /// <param name="info">付款批量登记信息业务实体</param> /// <returns></returns> public int BatchRegisterExpense(EyouSoft.Model.FinanceStructure.MBatchRegisterExpenseInfo info) { if (info == null || info.OperatorId <= 0 || info.CompanyId <= 0 || info.PaymentTime == DateTime.MinValue || info.TourIds == null || info.TourIds.Count < 1) { throw new System.Exception("请传递正确的参数。"); } int dalRetCode = dal.BatchRegisterExpense(info); #region LGWR if (dalRetCode == 1) { StringBuilder s = new StringBuilder(); s.Append(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "{0}在" + EyouSoft.Model.EnumType.CompanyStructure.SysPermissionClass.财务管理_团款支出.ToString() + "做批量付款登记"); s.Append(",登记的团队编号为:"); foreach (var tourId in info.TourIds) { s.Append(tourId + "、"); } s.Append(",供应商查询条件为:" + info.SearchGYSName + "。"); EyouSoft.Model.CompanyStructure.SysHandleLogs logInfo = new EyouSoft.Model.CompanyStructure.SysHandleLogs(); logInfo.CompanyId = 0; logInfo.DepatId = 0; logInfo.EventCode = EyouSoft.Model.CompanyStructure.SysHandleLogsNO.EventCode; logInfo.EventIp = string.Empty; logInfo.EventMessage = s.ToString(); logInfo.EventTime = DateTime.Now; logInfo.EventTitle = "批量付款登记"; logInfo.ModuleId = EyouSoft.Model.EnumType.CompanyStructure.SysPermissionClass.财务管理_团款支出; logInfo.OperatorId = 0; new EyouSoft.BLL.CompanyStructure.SysHandleLogs().Add(logInfo); } #endregion return(dalRetCode); }
/// <summary> /// 添加报价附件信息 /// </summary> /// <param name="QuoteAttach"></param> /// <returns></returns> public bool AddQuote(EyouSoft.Model.TourStructure.QuoteAttach QuoteAttach) { if (dal.AddQuote(QuoteAttach)) { #region LGWR EyouSoft.Model.CompanyStructure.SysHandleLogs logInfo = new EyouSoft.Model.CompanyStructure.SysHandleLogs(); logInfo.CompanyId = 0; logInfo.DepatId = 0; logInfo.EventCode = EyouSoft.Model.CompanyStructure.SysHandleLogsNO.EventCode; logInfo.EventIp = string.Empty; logInfo.EventMessage = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "{0}在" + EyouSoft.Model.EnumType.CompanyStructure.SysPermissionClass.团队计划_上传报价.ToString() + "上传了一个报价,上传标题:" + QuoteAttach.FileName; logInfo.EventTime = DateTime.Now; logInfo.EventTitle = "上传报价"; logInfo.ModuleId = EyouSoft.Model.EnumType.CompanyStructure.SysPermissionClass.团队计划_上传报价; logInfo.OperatorId = 0; this.Logwr(logInfo); return(true); #endregion } return(false); }
protected void Page_Load(object sender, EventArgs e) { //判断权限 if (!CheckGrant(global::Common.Enum.TravelPermission.系统设置_系统日志_系统日志栏目)) { Utils.ResponseNoPermit(global::Common.Enum.TravelPermission.系统设置_系统日志_系统日志栏目, false); return; } EyouSoft.BLL.CompanyStructure.SysHandleLogs logBll = new EyouSoft.BLL.CompanyStructure.SysHandleLogs();//日志bll //初始化日志信息 string logId = Utils.GetQueryStringValue("logid"); EyouSoft.Model.CompanyStructure.SysHandleLogs logModel = logBll.GetModel(logId);//日志实体 if (logModel != null) { litContent.Text = logModel.EventMessage; //内容 litDepart.Text = logModel.DepartName; //部门 litIP.Text = logModel.EventIp; //IP litModule.Text = logModel.ModuleId.ToString(); //操作模块 litOperator.Text = logModel.OperatorName; //操作人姓名 litTime.Text = logModel.EventTime.ToString("yyyy-MM-dd HH:mm"); //操作时间 } }
/// <summary> /// 添加操作日志 /// </summary> /// <param name="model">系统操作日志实体</param> /// <returns>true:成功 false:失败</returns> public bool Add(EyouSoft.Model.CompanyStructure.SysHandleLogs model) { if (model == null) { return(false); } //model.EventCode = Model.CompanyStructure.SysHandleLogsNO.EventCode; model.EventIp = Toolkit.Utils.GetRemoteIP(); model.EventTime = DateTime.Now; if (CurrUserInfo != null) { model.OperatorId = CurrUserInfo.ID; model.CompanyId = CurrUserInfo.CompanyID; model.DepatId = CurrUserInfo.DepartId; if (!string.IsNullOrEmpty(model.EventMessage) && model.EventMessage.Contains("{0}") && CurrUserInfo.ContactInfo != null) { model.EventMessage = string.Format(model.EventMessage, CurrUserInfo.ContactInfo.ContactName); } } return(Dal.Add(model)); }
/*/// <summary> * /// 修改机票地接社支出金额 * /// </summary> * /// <param name="TravelId">团队编号</param> * /// <returns></returns> * public bool UpdateSettle(PaymentList Model) * { * if (dal.UpdateSettle(Model)) * { //加日志 * AddSysLog("修改机票地接社支出金额"); * return true; * } * return false; * }*/ /// <summary> /// 修改机票地接社支出金额 /// </summary> /// <param name="ModelList">更改实体</param> /// <param name="TourId">团队编号</param> /// <returns></returns> public bool UpdateSettle(IList <PaymentList> ModelList, string TourId) { foreach (PaymentList model in ModelList) { dal.UpdateSettle(model); } //加日志 //AddSysLog("修改机票地接社支出金额"); EyouSoft.BLL.UtilityStructure.Utility u = new EyouSoft.BLL.UtilityStructure.Utility(); u.CalculationTourOut(TourId, null); u.CalculationTourSettleStatus(TourId); EyouSoft.Model.EnumType.TourStructure.TourType? tourType = new EyouSoft.BLL.TourStructure.Tour().GetTourType(TourId); Model.EnumType.CompanyStructure.SysPermissionClass mokuai = EyouSoft.Model.EnumType.CompanyStructure.SysPermissionClass.散拼计划_散拼计划; if (tourType != null && tourType == EyouSoft.Model.EnumType.TourStructure.TourType.团队计划) { mokuai = EyouSoft.Model.EnumType.CompanyStructure.SysPermissionClass.团队计划_团队计划; } foreach (var item in ModelList) { EyouSoft.Model.CompanyStructure.SysHandleLogs logInfo = new EyouSoft.Model.CompanyStructure.SysHandleLogs(); logInfo.CompanyId = 0; logInfo.DepatId = 0; logInfo.EventCode = EyouSoft.Model.CompanyStructure.SysHandleLogsNO.EventCode; logInfo.EventIp = string.Empty; logInfo.EventMessage = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "{0}在" + mokuai.ToString() + "团队核算修改了" + item.SupplierType.ToString() + "支出金额,支出项目编号为:" + item.Id + ",计划编号为:" + TourId; logInfo.EventTime = DateTime.Now; logInfo.EventTitle = "团队核算修改支出金额"; logInfo.ModuleId = mokuai; logInfo.OperatorId = 0; this.Logwr(logInfo); } return(true); }