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

            costForm.StartPosition = FormStartPosition.CenterScreen;
            costForm.Show();
        }
예제 #2
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();
     }
 }
예제 #3
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();
        }