private void FrmReportStock_Load(object sender, EventArgs e)
        {
            this.listBoxItemID.DataSource    = _itmDAO.GetAllItemData();
            this.listBoxItemID.DisplayMember = nameof(Item.itemID);

            this.listBoxItemID.ClearSelected();
            this.listBoxItemID.SelectedValueChanged += new EventHandler(listBoxItemID_SelectedValueChanged);
        }
        private void FrmTransaction_IN_Load(object sender, EventArgs e)
        {
            try
            {
                this.dgvItemData.DataSource = null;
                this.dgvItemData.DataSource = _itemDAO.GetAllItemData();
                this.dgvItemData.Columns[0].DataPropertyName = nameof(Item.itemID);
                this.dgvItemData.Columns[1].DataPropertyName = nameof(Item.itemName);

                this.cBoxID.DataSource = null;
                if (_itemOUT)
                {
                    this.cBoxID.DataSource  = _custDAO.GetAllCustomerData();
                    this.cBoxID.ValueMember = nameof(Customer.custID);
                }
                else
                {
                    this.cBoxID.DataSource    = _suppDAO.GetAllSupplierData();
                    this.cBoxID.DisplayMember = nameof(Supplier.suppID);
                }

                this.cBoxID.Text                  = "";
                this.lbl_GenerateName.Text        = "";
                this.cBoxID.SelectedValueChanged += new EventHandler(cBoxID_SelectedValueChanged);

                _transDAO.listTrans      = _transDAO.GetAllTransactionData(_itemOUT);
                this.txtBox_TransID.Text = _transDAO.GetTransactionIDNext(_itemOUT);

                if (_itemOUT)
                {
                    this.lbl_Company.Text += " - ITEM OUT";
                    this.dgvTransaction.Columns[3].HeaderText = "OUT_Ammount";
                    this.lbl_Total.Text += " OUT :";
                    this.lbl_ID.Text     = "Customer ID : ";
                    this.lbl_Name.Text   = "Customer Name : ";
                }
                else
                {
                    this.lbl_Company.Text += " - ITEM IN";
                    this.lbl_Total.Text   += " IN :";
                    this.lbl_ID.Text       = "Supplier ID : ";
                    this.lbl_Name.Text     = "Supplier Name : ";
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemple #3
0
 private void FrmItemData_Load(object sender, EventArgs e)
 {
     try
     {
         this.dgvItemData.DataSource = null;
         this.dgvItemData.DataSource = dao.GetAllItemData();
         this.dgvItemData.Columns[0].DataPropertyName = nameof(Item.itemID);
         this.dgvItemData.Columns[1].DataPropertyName = nameof(Item.itemName);
         this.dgvItemData.Columns[2].DataPropertyName = nameof(Item.qty);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }