コード例 #1
0
ファイル: Homepage.cs プロジェクト: orbisIT/inventory
 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();
 }