public Homepage(User obj) { InitializeComponent(); db = new asiainspEntities(); lblUsername.Text = obj.Username; lblUsername.TextAlign = ContentAlignment.TopRight; }
public EntryCustomer(Customer obj) { InitializeComponent(); db = new asiainspEntities(); if (obj == null) { customerBindingSource.DataSource = new Customer(); db.Customers.Add(customerBindingSource.Current as Customer); } else { customerBindingSource.DataSource = obj; db.Customers.Attach(customerBindingSource.Current as Customer); } }
public EntrySupplier(Supplier obj) { InitializeComponent(); db = new asiainspEntities(); if (obj == null) { supplierBindingSource.DataSource = new Supplier(); db.Suppliers.Add(supplierBindingSource.Current as Supplier); } else { supplierBindingSource.DataSource = obj; db.Suppliers.Attach(supplierBindingSource.Current as Supplier); } }
public EntryArticle(vw_articles obj) { InitializeComponent(); db = new asiainspEntities(); if (obj == null) { vwarticlesBindingSource.DataSource = new vw_articles(); art = new vw_articles(); //db.vw_articles.Add(vwarticlesBindingSource.Current as vw_articles); tbArticleCode.Focus(); } else { vwarticlesBindingSource.DataSource = obj; cboShape.SelectedItem = cboShape.FindString(art.ShapeName); db.vw_articles.Attach(vwarticlesBindingSource.Current as vw_articles); } }
public Login() { InitializeComponent(); db = new asiainspEntities(); }