示例#1
0
 /// <summary>
 /// 更新
 /// </summary>
 /// <param name="obj"></param>
 /// <returns></returns>
 public static bool Modify(Dt_commission obj)
 {
     try
     {
         obj.Update();
         return(true);
     }
     catch (Exception ex)
     {
         Log.Error(ex.Message);
         return(false);
     }
 }
示例#2
0
 public static void cableUpdate(Dt_commission c)
 {
     try
     {
         if (c.Updatetime == null)
         {
             c.Updatetime = DateTime.Now;
         }
         c.Update();
         using (DbHelper db = new DbHelper())
         {
             string        sql    = "Update cable set updateTime=@time where id=@id";
             DbParameter[] parmar = { db.CreateParameter("@time", c.Updatetime), db.CreateParameter("@id", c.Id) };
             db.ExecuteNonQuery(sql, parmar);
         }
     }
     catch (Exception ex)
     {
         Log.Error(ex.Message);
     }
 }