/// <summary> /// 通过会员编号检测会员信息是不是存在 /// </summary> /// <param name="cardNumber"></param> /// <returns></returns> public override bool CheckMembershipCard(string cardNumber) { if (!string.IsNullOrEmpty(cardNumber)) { string sql = " select * from DsMembershipCard where CardNumber ='" + cardNumber + "' "; DsMembershipCard mod = Context.Sql(sql).QuerySingle <DsMembershipCard>(); if (mod == null) { return(false); } else { return(true); } } return(false); }
///------------------------------------------------------------------ /// <summary> /// 修改会员卡 /// </summary> /// <param name="card"></param> /// <returns></returns> public void UpdateMembershipCard(DsMembershipCard card) { IDsMembershipCardDao.Instance.Update(card); }
/// <summary> /// 添加会员卡 /// </summary> /// <param name="card"></param> /// <returns></returns> public int InsertMembershipCard(DsMembershipCard card) { return(IDsMembershipCardDao.Instance.Insert(card)); }
/// <summary> /// 更新数据 /// </summary> /// <param name="cardMod"></param> public abstract void Update(DsMembershipCard cardMod);
/// <summary> /// 添加数据 /// </summary> /// <param name="cardMod"></param> /// <returns></returns> public abstract int Insert(DsMembershipCard cardMod);
/// <summary> /// 修改数据 /// </summary> /// <param name="cardMod"></param> public override void Update(DsMembershipCard cardMod) { Context.Update("DsMembershipCard", cardMod).AutoMap(p => p.SysNo).Where(p => p.SysNo).Execute();; }
/// <summary> /// 添加数据 /// </summary> /// <param name="cardMod"></param> /// <returns></returns> public override int Insert(DsMembershipCard cardMod) { return(Context.Insert("DsMembershipCard", cardMod).AutoMap(p => p.SysNo).ExecuteReturnLastId <int>("SysNo")); }