Exemplo n.º 1
0
        public PurchaseRecord(int id)
        {
            InitializeComponent();
            my_controller = new InventoryController();

            this.Load += new EventHandler(my_controller.purchaseLoad);
            this.comboSupplier.SelectedIndexChanged  += new EventHandler(my_controller.fillItemList);
            this.purchaseRecordsdgv.CellValueChanged += new DataGridViewCellEventHandler(my_controller.PurchaseRecords_CellValueChanged);
            this.purchaseRecordsdgv.CellValidated    += new DataGridViewCellEventHandler(PurchaseRecords_CellValidated);
            this.SavePurchase_btn.Click += new EventHandler(my_controller.purchaseRecord_btn_Click);

            //User label
            user   = new Users();
            userid = id;
            // lblUserInfo.Text = "Logged in:\n " + user.getName(Convert.ToInt32(userid));
            setup(userid.ToString(), "FAFOS Purchase Records");
        }
Exemplo n.º 2
0
        public PurchaseRecord(int id)
        {
            InitializeComponent();
            my_controller = new InventoryController();

            this.Load += new EventHandler(my_controller.purchaseLoad);
            this.comboSupplier.SelectedIndexChanged +=new EventHandler(my_controller.fillItemList);
            this.purchaseRecordsdgv.CellValueChanged +=new DataGridViewCellEventHandler(my_controller.PurchaseRecords_CellValueChanged);
            this.purchaseRecordsdgv.CellValidated += new DataGridViewCellEventHandler(PurchaseRecords_CellValidated);
            this.SavePurchase_btn.Click +=new EventHandler(my_controller.purchaseRecord_btn_Click);

            //User label
            user = new Users();
            userid = id;
               // lblUserInfo.Text = "Logged in:\n " + user.getName(Convert.ToInt32(userid));
            setup(userid.ToString(), "FAFOS Purchase Records");
        }
Exemplo n.º 3
0
        public InventoryForm(int id)
        {
            InitializeComponent();
            my_controller = new InventoryController();
            userid = id;

            this.Save_btn.Click += new System.EventHandler(my_controller.Save_btn_Click);
            this.AddProduct_btn.Click += new System.EventHandler(my_controller.addProduct_btn_Click);
            this.AddService_btn.Click += new EventHandler(my_controller.addService_btn_Click);
            this.Load += new System.EventHandler(my_controller.Load);
            this.productsdgv.ColumnHeaderMouseClick +=new DataGridViewCellMouseEventHandler(productsdgv_ColumnHeaderMouseClick);
            this.productsdgv.CellContentClick+=new DataGridViewCellEventHandler(my_controller.Delete_Product_btn_Click);
            this.servicesdgv.CellContentClick+=new DataGridViewCellEventHandler(my_controller.Delete_Service_btn_Click);
            this.productsdgv.AutoGenerateColumns = false;
            productsdgv.DataError += new DataGridViewDataErrorEventHandler(productsdgv_DataError);
            servicesdgv.DataError += new DataGridViewDataErrorEventHandler(servicesdgv_DataError);
            productsdgv.CellEndEdit += new DataGridViewCellEventHandler(productsdgv_CellEndEdit);
            servicesdgv.CellEndEdit += new DataGridViewCellEventHandler(servicesdgv_CellEndEdit);

            //User label
            user = new Users();
            userid = id;
            setup(userid.ToString(), "FAFOS Inventory");
        }
Exemplo n.º 4
0
        public InventoryForm(int id)
        {
            InitializeComponent();
            my_controller = new InventoryController();
            userid        = id;

            this.Save_btn.Click       += new System.EventHandler(my_controller.Save_btn_Click);
            this.AddProduct_btn.Click += new System.EventHandler(my_controller.addProduct_btn_Click);
            this.AddService_btn.Click += new EventHandler(my_controller.addService_btn_Click);
            this.Load += new System.EventHandler(my_controller.Load);
            this.productsdgv.ColumnHeaderMouseClick += new DataGridViewCellMouseEventHandler(productsdgv_ColumnHeaderMouseClick);
            this.productsdgv.CellContentClick       += new DataGridViewCellEventHandler(my_controller.Delete_Product_btn_Click);
            this.servicesdgv.CellContentClick       += new DataGridViewCellEventHandler(my_controller.Delete_Service_btn_Click);
            this.productsdgv.AutoGenerateColumns     = false;
            productsdgv.DataError   += new DataGridViewDataErrorEventHandler(productsdgv_DataError);
            servicesdgv.DataError   += new DataGridViewDataErrorEventHandler(servicesdgv_DataError);
            productsdgv.CellEndEdit += new DataGridViewCellEventHandler(productsdgv_CellEndEdit);
            servicesdgv.CellEndEdit += new DataGridViewCellEventHandler(servicesdgv_CellEndEdit);

            //User label
            user   = new Users();
            userid = id;
            setup(userid.ToString(), "FAFOS Inventory");
        }