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

            income.TransactionID = Convert.ToInt32(lblTransactionID.Text);
            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.UpdateIncome(income);

            if (res)
            {
                MessageBox.Show("Record Updated Succesfully.!");
                bindIncomeGrid();
                pnlAddIncomeForm.Visible = false;
                PnlIncomeGrid.Visible    = true;
            }
            else
            {
                MessageBox.Show("Error.!");
            }
        }
コード例 #2
0
ファイル: AddIncome.cs プロジェクト: panchal0026/Account
        private void btnUpdate_Click(object sender, EventArgs e)
        {
            IncomeDetailManager income = new IncomeDetailManager();
            income.TransactionID = Convert.ToInt32(lblTransactionID.Text);
            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.UpdateIncome(income);

            if (res)
            {
                MessageBox.Show("Record Updated Succesfully.!");
                bindIncomeGrid();
                pnlAddIncomeForm.Visible = false;
                PnlIncomeGrid.Visible = true;

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