Esempio n. 1
0
        private void btn_update_Click(object sender, EventArgs e)
        {
            List <Revenue> list = new List <Revenue>();

            list = Revenue.SelectallObject_WithMonthYear(cbb_months.Text, cbb_years.Text);
            if (list.Count == 0)
            {
                Revenue re = new Revenue("", cbb_months.Text, cbb_years.Text, Double.Parse(txt_money.Text));
                re.Insert();
                reLoad();
            }
            else
            {
                Revenue re = new Revenue("", cbb_months.Text, cbb_years.Text, Double.Parse(txt_money.Text));

                re.Update();
                reLoad();
            }
        }