/// <summary> ///不存在则添加否则更新 /// </summary> /// <param name="Subscribe"></param> /// <returns></returns> public bool InsertUpdate(M_Subscribe model) { if (model.ID > 0) { return(UpdateByID(model)); } else { return(insert(model) > 0); } }
/// <summary> ///更新记录 /// </summary> /// <param name="Subscribe"></param> /// <returns></returns> public bool GetUpdate(M_Subscribe model) { return(UpdateByID(model)); }
/// <summary> ///添加记录 /// </summary> /// <param name="Subscribe"></param> /// <returns></returns> public bool GetInsert(M_Subscribe model) { return(insert(model) > 0); }
public int insert(M_Subscribe model) { return(Sql.insert(strTableName, model.GetParameters(model), BLLCommon.GetParas(model), BLLCommon.GetFields(model))); }
public bool UpdateByID(M_Subscribe model) { return(Sql.UpdateByIDs(strTableName, PK, model.ID.ToString(), BLLCommon.GetFieldAndPara(model), model.GetParameters(model))); }
public int insert(M_Subscribe model) { return(DBCenter.Insert(model)); }
public bool UpdateByID(M_Subscribe model) { return(DBCenter.UpdateByID(model, model.ID)); }