public List <SqlParameter> SetValuesInHotelType(HotelTypeInfo HotelType) { List <SqlParameter> sqlParam = new List <SqlParameter>(); if (HotelType.HotelTypeId != 0) { sqlParam.Add(new SqlParameter("HotelTypeId", HotelType.HotelTypeId)); } else { sqlParam.Add(new SqlParameter("CreatedDate", HotelType.CreatedDate)); sqlParam.Add(new SqlParameter("CreatedBy", HotelType.CreatedBy)); } sqlParam.Add(new SqlParameter("HotelType", HotelType.HotelType)); Logger.Debug("HotelType Controller HotelType:" + HotelType.HotelType); sqlParam.Add(new SqlParameter("@IsActive", HotelType.IsActive)); Logger.Debug("HotelType Controller IsActive:" + HotelType.IsActive); sqlParam.Add(new SqlParameter("UpdatedBy", HotelType.UpdatedBy)); sqlParam.Add(new SqlParameter("UpdatedDate", HotelType.UpdatedDate)); return(sqlParam); }
public HotelTypeViewModel() { HotelTypeInfo = new HotelTypeInfo(); Pager = new PaginationInfo(); HotelTypes = new List <HotelTypeInfo>(); FriendlyMessage = new List <FriendlyMessage>(); Filter = new HotelTypeFilter(); }
public void Update(HotelTypeInfo HotelType) { _sqlHelper.ExecuteNonQuery(SetValuesInHotelType(HotelType), Storeprocedures.spUpdateHotelType.ToString(), CommandType.StoredProcedure); }
public int Insert(HotelTypeInfo HotelType) { return(Convert.ToInt32(_sqlHelper.ExecuteScalerObj(SetValuesInHotelType(HotelType), Storeprocedures.spInsertHotelType.ToString(), CommandType.StoredProcedure))); }