コード例 #1
0
ファイル: AddIncome.cs プロジェクト: panchal0026/Account
        private void btnAddNewIncome_Click(object sender, EventArgs e)
        {
            IncomeDetailManager income = new IncomeDetailManager();

            income.LocationID = Convert.ToInt32(drpLocationList.SelectedValue);
            income.Name       = txtName.Text;
            income.Date       = Convert.ToDateTime(dateTime.Text);
            income.Amount     = Convert.ToInt32(txtAmount.Text);
            income.Note       = txtNote.Text;
            bool res = income.AddIncome(income);

            if (res)
            {
                MessageBox.Show("Record Inserted Succesfully.!");
                bindIncomeGrid();

                pnlAddIncomeForm.Visible = false;
                PnlIncomeGrid.Visible    = true;
            }
            else
            {
                MessageBox.Show("Error.!");
            }
        }
コード例 #2
0
ファイル: AddIncome.cs プロジェクト: panchal0026/Account
        private void btnAddNewIncome_Click(object sender, EventArgs e)
        {
            IncomeDetailManager income = new IncomeDetailManager();
            income.LocationID = Convert.ToInt32(drpLocationList.SelectedValue);
            income.Name = txtName.Text;
            income.Date = Convert.ToDateTime(dateTime.Text);
            income.Amount = Convert.ToInt32(txtAmount.Text);
            income.Note = txtNote.Text;
            bool res = income.AddIncome(income);

            if (res)
            {
                MessageBox.Show("Record Inserted Succesfully.!");
                bindIncomeGrid();

                pnlAddIncomeForm.Visible = false;
                PnlIncomeGrid.Visible = true;

            }
            else
            {
                MessageBox.Show("Error.!");
            }
        }