public static ReserveDTO Translate(Model.ReserveDTO field) { ReserveDTO Output = new ReserveDTO(); Output.RID = field.RID; Output.UID = field.UID; Output.MediaID = field.MediaID; Output.ReservedDate = field.ReservedDate; return(Output); }
public List <ReserveDTO> GetReserves() { var reserveTable = new UserData.TabReservedDataTable(); var reserveAdapter = new TabReservedTableAdapter(); List <ReserveDTO> reserveList = new List <ReserveDTO>(); int rowCount = reserveAdapter.getReserve(reserveTable); if (rowCount > 0) { foreach (DataRow r in reserveTable.Rows) { ReserveDTO reserve = new ReserveDTO(); reserve.RID = int.Parse(r["RID"].ToString()); reserve.UserName = r["UserName"].ToString(); reserve.Title = r["Title"].ToString(); reserve.ReservedDate = r["ReservedDate"].ToString(); reserveList.Add(reserve); } } return(reserveList); }
public int AddReserved(ReserveDTO record) { throw new NotImplementedException(); }