예제 #1
0
 public Homepage(User obj)
 {
     InitializeComponent();
     db = new asiainspEntities();
     lblUsername.Text      = obj.Username;
     lblUsername.TextAlign = ContentAlignment.TopRight;
 }
예제 #2
0
 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);
     }
 }
예제 #3
0
 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);
     }
 }
예제 #4
0
        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);
            }
        }
예제 #5
0
 public Login()
 {
     InitializeComponent();
     db = new asiainspEntities();
 }