private void linkLabelCreateCost_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            CostsForm costForm = new CostsForm();

            costForm.StartPosition = FormStartPosition.CenterScreen;
            costForm.Show();
        }
예제 #2
0
 private void viewCost(object sender, EventArgs e)
 {
     if (ID != 0)
     {
         CostsForm costForm = new CostsForm();
         costForm.costId = ID;
         costForm.ShowDialog();
     }
 }
예제 #3
0
 private void btCosts_Click(object sender, EventArgs e)
 {
     if (LoginInfor.IsAdmin)
     {
         CostsForm costForm = new CostsForm();
         costForm.StartPosition = FormStartPosition.CenterScreen;
         costForm.Show();
     }
     else
     {
         LoginForm loginForm = new LoginForm();
         loginForm.StartPosition = FormStartPosition.CenterScreen;
         loginForm.ShowDialog();
     }
 }
예제 #4
0
        private void linkLabelFormCash_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            CostsForm costForm = new CostsForm();

            costForm.selectedCostTypeId = costTypeTableAdapter.GetDataByName(Constant.PaymentMethod.BANK_TRANSFER)[0].CostTypeId;
            (costForm.Controls.Find(Constant.CostType.COST_TYPE_COMBOBOX_CONTROL_NAME, true)[0] as ComboBox).Enabled = false;

            if (cboxBankAccount.SelectedValue.ToString() != "0")
            {
                costForm.isOpenedByBankAccountManagement = true;
                costForm.selectedBankAccountId           = int.Parse(cboxBankAccount.SelectedValue.ToString());
            }

            costForm.Show();
        }
        private void gridViewCashDetail_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            DataGridViewRow row = gridViewCashDetail.Rows[e.RowIndex];

            if (row.IsNewRow)
            {
                return;
            }

            string action = row.Cells[ACTION_COLUMN_NAME].Value.ToString();
            int    id     = int.Parse(row.Cells[ID_COLUMN_NAME].Value.ToString());

            switch (action)
            {
            case BILL_OF_COST:
                CostsForm costForm = new CostsForm();
                costForm.costId        = id;
                costForm.StartPosition = FormStartPosition.CenterScreen;
                costForm.ShowDialog();
                return;

            case BILL_OF_INCOME:
                IncomeForm incomeForm = new IncomeForm();
                incomeForm.incomeId      = id;
                incomeForm.StartPosition = FormStartPosition.CenterScreen;
                incomeForm.ShowDialog();
                return;

            case BILL_OF_ORDER:
                PurchaseReceiptOrderForm proForm = new PurchaseReceiptOrderForm();
                proForm.PurchaseReceiveOrderId = id;
                proForm.StartPosition          = FormStartPosition.CenterScreen;
                proForm.ShowDialog();
                return;
            }
        }