/// <summary> /// 写日志 /// </summary> /// <param name="log">日志信息业务实体</param> /// <returns></returns> public bool WLog(EyouSoft.Model.TicketStructure.MLogTicketInfo log) { if (log == null) { return(true); } return(dal.WLog(log)); }
/// <summary> /// 写日志 /// </summary> /// <param name="log">日志信息业务实体</param> /// <returns></returns> public virtual bool WLog(EyouSoft.Model.TicketStructure.MLogTicketInfo log) { DbCommand cmd = this._db.GetSqlStringCommand(SQL_INSERT_WLog); this._db.AddInParameter(cmd, "CompanyId", DbType.AnsiStringFixedLength, log.CompanyId); this._db.AddInParameter(cmd, "UserId", DbType.AnsiStringFixedLength, log.UserId); this._db.AddInParameter(cmd, "LCity", DbType.AnsiStringFixedLength, log.LCity); this._db.AddInParameter(cmd, "RCity", DbType.AnsiStringFixedLength, log.RCity); this._db.AddInParameter(cmd, "LDate", DbType.AnsiStringFixedLength, log.LDate); this._db.AddInParameter(cmd, "RDate", DbType.AnsiStringFixedLength, log.RDate); this._db.AddInParameter(cmd, "CDate", DbType.AnsiStringFixedLength, DateTime.Now); return(DbHelper.ExecuteSql(cmd, this._db) == 1 ? true : false); }
/// <summary> /// 写日志 /// </summary> private void WLog() { if (SiteUserInfo == null) { return; } EyouSoft.Model.TicketStructure.MLogTicketInfo log = new EyouSoft.Model.TicketStructure.MLogTicketInfo() { CompanyId = SiteUserInfo.CompanyID, UserId = SiteUserInfo.ID }; EyouSoft.BLL.TicketStructure.BLogTicket.CreateInstance().WLog(log); }
/// <summary> /// 写日志 /// </summary> /// <param name="log"></param> private void WLog(EyouSoft.Model.TicketStructure.MLogTicketInfo log) { EyouSoft.BLL.TicketStructure.BLogTicket.CreateInstance().WLog(log); }
public void ProcessRequest(HttpContext context) { base.BaseInit(context); FXUser.Add("!@#$test", "xxx"); PostResult pResult = new PostResult(true, string.Empty, string.Empty); string isFromMQ = context.Request["isFromMQ"]; string isFromCenter = context.Request["isFromCenter"]; EyouSoft.Model.TicketStructure.MLogTicketInfo logInfo = null; if (pResult.IsSucceed) { if (IsLogin) //是否登录 { //出发城市三字码 string fromCity = context.Request["flke"]; //目的地三字码 string toCity = context.Request["tlke"]; //出发日期 string startDate = context.Request["startTime"]; //返程日期 string EndDate = context.Request["endTime"]; Adpost.Ticket.Model.VoyageType VoyageType = Adpost.Ticket.Model.VoyageType.单程; int intVoyageType = EyouSoft.Common.Utils.GetInt(context.Request["VoyageType"]); switch (intVoyageType) { case 2: VoyageType = Adpost.Ticket.Model.VoyageType.往返; break; case 3: VoyageType = Adpost.Ticket.Model.VoyageType.联程; break; } Adpost.Ticket.Model.TicketModel model = new Adpost.Ticket.Model.TicketModel(); //model.System = this.InitSysModel(); model.User = this.InitUserModel(); //出发城市 model.Flight.FromCity = fromCity; //到达城市 model.Flight.ToCity = toCity; //出发时间 model.Flight.TakeOffDate = EyouSoft.Common.Utils.GetDateTimeNullable(startDate); //航程类型 model.Flight.VoyageSet = VoyageType; if (VoyageType == Adpost.Ticket.Model.VoyageType.往返) { //返回时间 model.Flight.ReturnDate = EyouSoft.Common.Utils.GetDateTimeNullable(EndDate); } //验证表单是否已填写完整 Adpost.Ticket.Model.ValidateResult validate = Adpost.Ticket.BLL.Ticket.ValidateForm(model.Flight); if (!validate.IsSuccess) { pResult.IsSucceed = false; pResult.ErrorMsg = validate.ErrorInfo.ToString(); } else { Adpost.Ticket.Model.TicketQueryResult result = QueryURL(model, InitSysModel()); if (result.IsSuccess) { pResult.IsSucceed = true; pResult.RedirectUrl = result.TicketGotoUrl; } else { pResult.IsSucceed = false; pResult.ErrorMsg = result.ErrorInfo.ToString(); } logInfo = new EyouSoft.Model.TicketStructure.MLogTicketInfo() { CDate = DateTime.Now, CompanyId = SiteUserInfo.CompanyID, LCity = model.Flight.FromCity, LDate = model.Flight.TakeOffDate, RCity = model.Flight.ToCity, RDate = model.Flight.ReturnDate, UserId = SiteUserInfo.ID }; } model = null; } else { pResult.IsSucceed = false; pResult.ErrorMsg = "请您先登录"; } } if (!string.IsNullOrEmpty(isFromMQ) || !string.IsNullOrEmpty(isFromCenter)) { if (logInfo != null) { WLog(logInfo); } context.Response.Redirect(pResult.RedirectUrl); context.Response.End(); } else { string output = JsonConvert.SerializeObject(pResult); string callback = Utils.InputText(context.Request.QueryString["callback"]); context.Response.Write(";" + callback + "(" + output + ")"); context.Response.End(); } }