/// <summary> /// 获取国际票改签备注表 /// </summary> /// <param name="model"></param> /// <returns></returns> public IEnumerable <InterChangeRemark> GetInterChangeRemarkList(InterChangeRemark model) { string wherestr = string.Empty; if (!string.IsNullOrEmpty(model.OrderId)) { wherestr += " AND OrderId=@0 "; } string sql = string.Format(@"select * from [dbo].[InterChangeRemark] where 1 = 1 {0} ", wherestr); return(CgtTicketDB.GetInstance().Query <InterChangeRemark>(sql, model.OrderId)); }
public int UpdateInterChangeAndInterChangeRemark(InterChange ChangeModel, InterChangeRemark model) { var acr = CgtTicketDB.GetInstance(); int i = 0; try { acr.BeginTransaction(); acr.Insert(model); i += acr.Execute(@"UPDATE [InterChange] SET ModifyUserId=@0,ModifyUserName=@1,ModifyTime=@2,[Status]=@4 WHERE [orderid]=@3", ChangeModel.ModifyUserId, ChangeModel.ModifyUserName, ChangeModel.ModifyTime, ChangeModel.OrderID, ChangeModel.Status); acr.CompleteTransaction(); } catch (Exception ex) { acr.AbortTransaction(); throw ex; } return(i); }
/// <summary> /// 插入 /// </summary> /// <param name="model"></param> public void Insert(InterChangeRemark model) { CgtTicketDB.GetInstance().Insert(model); }