public string UnAllocate(UnAllocateRoom unAllocateRoom) { int rowAffected = 0; rowAffected = aUnAllocateRoomGateway.IsRoomAllocate(unAllocateRoom); if (rowAffected > 0) { return("UnAllocate Successfully"); } return("Already All Are UnAllocated"); }
public int IsRoomAllocate(UnAllocateRoom unAllocateRoom) { Query = "UPDATE ClassRoom SET Status=@Status WHERE Status='Allocate'"; Command = new SqlCommand(Query, Connection); Command.Parameters.Clear(); Command.Parameters.Add("Status", SqlDbType.VarChar); Command.Parameters["Status"].Value = "UnAllocate"; Connection.Open(); int rowAffected = Command.ExecuteNonQuery(); Connection.Close(); return(rowAffected); }
public ActionResult UnAllocateRoom(UnAllocateRoom unAllocateRoom) { ViewBag.Message = auAllocateRoomManager.UnAllocate(unAllocateRoom); return(View()); }