private void LoginIn_Load(object sender, EventArgs e) { try { TUN.Text = XmlOper.getusername(); TPW.Focus(); } catch (Exception err) { MessageBox.Show(err.ToString()); } }
// GET: StockManagement public ActionResult Index() { var PMModel = new StockManagementViewModel(); using (var db = new TPW()) { PMModel.ShortDescriptions = db.ShortDescriptions.ToList(); PMModel.FullDescriptions = db.FullDescriptions.ToList(); PMModel.Observations = db.Observations.ToList(); PMModel.Recommendations = db.Recommendations.ToList(); PMModel.Capacities = db.Capacities.ToList(); PMModel.Categories = db.Categories.ToList(); PMModel.Colors = db.Colors.ToList(); PMModel.Lines = db.Lines.ToList(); PMModel.Origins = db.Origins.ToList(); PMModel.Parts = db.Parts.ToList(); } return(View(PMModel)); }
// GET: Products/Create public ActionResult Create() { var PModel = new ProductCreateEditViewModel(); using (var db = new TPW()) { PModel.ShortDescriptions = db.ShortDescriptions.ToList(); PModel.FullDescriptions = db.FullDescriptions.ToList(); PModel.Observations = db.Observations.ToList(); PModel.Recommendations = db.Recommendations.ToList(); PModel.Capacities = db.Capacities.ToList(); PModel.Categories = db.Categories.ToList(); PModel.Colors = db.Colors.ToList(); PModel.Lines = db.Lines.ToList(); PModel.Origins = db.Origins.ToList(); PModel.Parts = db.Parts.ToList(); //Products = db.Products.ToList(); } return(View(PModel)); }