예제 #1
0
 /// <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);
     }
 }
예제 #2
0
 /// <summary>
 ///更新记录
 /// </summary>
 /// <param name="Subscribe"></param>
 /// <returns></returns>
 public bool GetUpdate(M_Subscribe model)
 {
     return(UpdateByID(model));
 }
예제 #3
0
 /// <summary>
 ///添加记录
 /// </summary>
 /// <param name="Subscribe"></param>
 /// <returns></returns>
 public bool GetInsert(M_Subscribe model)
 {
     return(insert(model) > 0);
 }
예제 #4
0
 public int insert(M_Subscribe model)
 {
     return(Sql.insert(strTableName, model.GetParameters(model), BLLCommon.GetParas(model), BLLCommon.GetFields(model)));
 }
예제 #5
0
 public bool UpdateByID(M_Subscribe model)
 {
     return(Sql.UpdateByIDs(strTableName, PK, model.ID.ToString(), BLLCommon.GetFieldAndPara(model), model.GetParameters(model)));
 }
예제 #6
0
 public int insert(M_Subscribe model)
 {
     return(DBCenter.Insert(model));
 }
예제 #7
0
 public bool UpdateByID(M_Subscribe model)
 {
     return(DBCenter.UpdateByID(model, model.ID));
 }