public ActionResult editMaterialPriceAppointment(int ID)
        {
            ViewBag.RecordStatus = new SelectList(Enum.GetValues(typeof(RecordStatus)));
            ViewBag.Material     = virames <Material> .Initialize(new List <Material>()).GetList().Select(x => new SelectListItem
            {
                Value = x.ID.ToString(),
                Text  = x.CodeAndDefinition + " | " + x.MaterialType + " | " + x.TraceType + " | " + x.MainUnit
            });

            MaterialPriceAppointment materialPrice = virames <MaterialPriceAppointment>
                                                     .Initialize(new MaterialPriceAppointment()).Where(x => x.ID.ToString() == ID.ToString())
                                                     .Take();

            ViewBag.Material = materialPrice;
            return(View(materialPrice));
        }
        public ActionResult detailMaterialPriceAppointment(int ID)
        {
            ViewBag.Material = virames <Material> .Initialize(new List <Material>()).GetList().Select(x => new SelectListItem
            {
                Value = x.ID.ToString(),
                Text  = x.CodeAndDefinition + " | " + x.MaterialType + " | " + x.TraceType + " | " + x.MainUnit
            });

            ViewBag.CriteriaSet = virames <CriteriaSet> .Initialize(new List <CriteriaSet>()).GetList().Select(x => new SelectListItem
            {
                Value = x.ID.ToString(),
                Text  = x.CodeAndDefinition + " | " + x.SpeCode
            });

            MaterialPriceAppointment materialPrice = virames <MaterialPriceAppointment>
                                                     .Initialize(new MaterialPriceAppointment()).Where(x => x.ID.ToString() == ID.ToString())
                                                     .Take();

            return(View(materialPrice));
        }
        public ActionResult newMaterialPriceAppointment()
        {
            ViewBag.Material = virames <Material> .Initialize(new List <Material>()).GetList().Select(x => new SelectListItem
            {
                Value = x.ID.ToString(),
                Text  = x.CodeAndDefinition + " | " + x.MaterialType + " | " + x.TraceType + " | " + x.MainUnit
            });



            ViewBag.Currency = virames <Currency> .Initialize(new List <Currency>()).GetList().Select(x => new SelectListItem
            {
                Value = x.ID.ToString(),
                Text  = x.Name + " | " + x.Symbol
            });

            ViewBag.Pricetype     = new SelectList(Enum.GetValues(typeof(PriceType)));
            ViewBag.MaterialPrice = new SelectList(Enum.GetValues(typeof(Status)));

            MaterialPriceAppointment materialPrice = new MaterialPriceAppointment();

            return(View(materialPrice));
        }
 public ActionResult detailMaterialPriceAppointment(MaterialPriceAppointment materialPrice)
 {
     materialPrice.Save();
     return(RedirectToAction("materialPriceAppointment"));
 }