/// <summary> /// /// </summary> /// <param name="id"></param> /// <returns></returns> public ActionResult Details(Nullable <byte> id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } PaymentGroupVwViewModel paymentGroupVwViewModel = new PaymentGroupVwViewModel(); Db db = new Db(DbServices.ConnectionString); // paymentGroupVwViewModel.Instance = PaymentGroupVwServices.Get(id.Value, db); paymentGroupVwViewModel.Instance = PaymentGroupVwServices.GetChildren(id.Value, db); if (paymentGroupVwViewModel.Instance == null) { return(HttpNotFound()); } @ViewBag.ProductTypeVwTitle = ResourceServices.GetString(Cf.Data.Resources.ResourceBase.Culture, "ProductType", "ModuleNamePlural"); // paymentGroupVwViewModel.ProductTypeVwViewModel.List = ProductTypeVwServices.GetByPaymentGroupId(id.Value, db); paymentGroupVwViewModel.ProductTypeVwViewModel.List = paymentGroupVwViewModel.Instance.ProductTypeVwList; return(View(paymentGroupVwViewModel)); }
/// <summary> /// Returns a list of PaymentGroupVw objects /// </summary> /// <returns></returns> public ActionResult Index(PaymentGroupVwViewModel Model) { Db db = new Db(DbServices.ConnectionString); Model.List = PaymentGroupVwServices.List(db); return(View(Model)); }
private void FormPaymentGroupView_Load(object sender, EventArgs e) { if (dataSource == null) { DateTime dt = DateTime.Now; DataSource = PaymentGroupVwServices.List(new Db(DbServices.ConnectionString)); slblEllapsedTimeValue.Text = (DateTime.Now.Subtract(dt).TotalMilliseconds / 1000).ToString(); } }