Beispiel #1
0
        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);
        }
Beispiel #2
0
        public HotelTypeViewModel()
        {
            HotelTypeInfo = new HotelTypeInfo();

            Pager = new PaginationInfo();

            HotelTypes = new List <HotelTypeInfo>();

            FriendlyMessage = new List <FriendlyMessage>();

            Filter = new HotelTypeFilter();
        }
Beispiel #3
0
 public void Update(HotelTypeInfo HotelType)
 {
     _sqlHelper.ExecuteNonQuery(SetValuesInHotelType(HotelType), Storeprocedures.spUpdateHotelType.ToString(), CommandType.StoredProcedure);
 }
Beispiel #4
0
 public int Insert(HotelTypeInfo HotelType)
 {
     return(Convert.ToInt32(_sqlHelper.ExecuteScalerObj(SetValuesInHotelType(HotelType), Storeprocedures.spInsertHotelType.ToString(), CommandType.StoredProcedure)));
 }