Exemple #1
0
        /// <summary>
        /// Returns a list of ProductTypeAvailabilityVw objects
        /// </summary>
        /// <returns></returns>
        public ActionResult Index(ProductTypeAvailabilityVwViewModel Model)
        {
            Db db = new Db(DbServices.ConnectionString);

            Model.List = ProductTypeAvailabilityVwServices.List(db);
            return(View(Model));
        }
Exemple #2
0
 private void FormProductTypeAvailabilityView_Load(object sender, EventArgs e)
 {
     if (dataSource == null)
     {
         DateTime dt = DateTime.Now;
         DataSource = ProductTypeAvailabilityVwServices.List(new Db(DbServices.ConnectionString));
         slblEllapsedTimeValue.Text = (DateTime.Now.Subtract(dt).TotalMilliseconds / 1000).ToString();
     }
 }
Exemple #3
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public ActionResult Details(Nullable <int> id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ProductTypeAvailabilityVwViewModel productTypeAvailabilityVwViewModel = new ProductTypeAvailabilityVwViewModel();

            Db db = new Db(DbServices.ConnectionString);

            // productTypeAvailabilityVwViewModel.Instance = ProductTypeAvailabilityVwServices.Get(id.Value, db);
            productTypeAvailabilityVwViewModel.Instance = ProductTypeAvailabilityVwServices.GetChildren(id.Value, db);
            if (productTypeAvailabilityVwViewModel.Instance == null)
            {
                return(HttpNotFound());
            }


            return(View(productTypeAvailabilityVwViewModel));
        }