Example #1
0
        void InputAlloc(TextBox tb, int num)
        {
            if (!save)
            {
                SaveMA();
            }

            AllocCosts ac;

            //if (index == 0)
            //    ac = new AllocCosts(num);
            //else
            ac = new AllocCosts(index, db, num, tb.Text.Trim());
            if (tb.Text.Trim() != String.Empty)
            {
                ac.price = tb.Text;
            }
            else
            {
                ac.price = String.Empty;
            }
            ac.ShowDialog();
            if (ac.price != null || ac.price != "")
            {
                tb.Text = ac.price.ToString();
            }
        }
        void InputAlloc(TextBox tb, int num)
        {
            if (!save)
            {
                SaveMA();
            }
            /* TODO: проверка на существование в справочнике мероприятий */
            if (CheckConf() == false)
            {
                return;
            }

            AllocCosts ac;

            //if (index == 0)
            //    ac = new AllocCosts(num);
            //else
            ac = new AllocCosts(index, db, num, tb.Text.Trim());
            if (tb.Text.Trim() != String.Empty)
            {
                ac.price = tb.Text;
            }
            else
            {
                ac.price = String.Empty;
            }
            ac.ShowDialog();
            if (ac.price != null || ac.price != "")
            {
                tb.Text = ac.price.ToString();
            }
        }
        void InputAlloc(TextBox tb, int num)
        {
            if (!save)
                SaveMA();
            /* TODO: проверка на существование в справочнике мероприятий */
            if (CheckConf() == false)
                return;

            AllocCosts ac;
            //if (index == 0)
            //    ac = new AllocCosts(num);
            //else
            ac = new AllocCosts(index, db, num, tb.Text.Trim());
                if (tb.Text.Trim() != String.Empty)
                    ac.price = tb.Text;
                else
                    ac.price = String.Empty;
            ac.ShowDialog();
            if (ac.price != null || ac.price != "")
                tb.Text = ac.price.ToString();
        }
Example #4
0
        private void button57_Click(object sender, EventArgs e)
        {
            sql sql1 = new sql();

            if (globalData.dtSBA == null)
                globalData.dtSBA = sql1.GetRecords("exec fillSBA");

            AllocCosts ac;

            ac = new AllocCosts();
            ac.ShowDialog();

            SelMAWithSBA2(_dgvMA2);
        }
        void InputAlloc(TextBox tb, int num)
        {
            if (!save)
                SaveMA();

            AllocCosts ac;
            //if (index == 0)
            //    ac = new AllocCosts(num);
            //else
            ac = new AllocCosts(index, db, num, tb.Text.Trim());
                if (tb.Text.Trim() != String.Empty)
                    ac.price = tb.Text;
                else
                    ac.price = String.Empty;
            ac.ShowDialog();
            if (ac.price != null || ac.price != "")
                tb.Text = ac.price.ToString();
        }