예제 #1
0
 internal static int Update(DuiHuan model)
 {
     using (var cn = new MySqlConnection(sqlconnectionString))
     {
         cn.Open();
         int i = cn.Execute(@"update DuiHuan set GiveOut = @GiveOut where ID = @ID", model);
         cn.Close();
         return(i);
     }
 }
예제 #2
0
        public object Post([FromBody] DuiHuan model)
        {
            model.GiveOut = giveOut.发放了;
            int result = DuiHuanBLL.Update(model);

            if (result > 0)
            {
                return(new { result = 0 });
            }
            return(new { result = 1 });
        }
예제 #3
0
 public static int Update(DuiHuan model)
 {
     return(DuiHuanDAL.Update(model));
 }