private void simpleButtonOK_Click(object sender, EventArgs e)
        {
            ConnDB conn = new ConnDB();
            string strsql, strsql2;
            int    rows;

            strsql  = "insert into cost_product_quantity(cdate,type,product_quantity) values('" + dateEditDate.Text.ToString() + "',2," + textEditQuantity.Text.ToString().Trim() + ")";
            strsql2 = "select cdate from cost_product_quantity where cdate ='" + dateEditDate.Text.ToString() + "' and type = 2";
            if (textEditQuantity.Text.ToString() != "")
            {
                rows = conn.ReturnRecordCount(strsql2);
                if (rows > 0)
                {
                    MessageBox.Show("此日期记录已经存在!");
                }
                else
                {
                    bool isok = conn.EditDatabase(strsql);
                    if (isok)
                    {
                        MessageBox.Show("添加成功!");
                        ChannelQuantityQuery.RefreshEX();
                        this.Close();
                    }
                }
            }
            else
            {
                MessageBox.Show("信道数量不能为空!");
            }
            conn.Close();
        }
Esempio n. 2
0
 public static ChannelQuantityQuery GetInstance()
 {
     if (ehqform == null || ehqform.IsDisposed)
     {
         ehqform = new ChannelQuantityQuery();
     }
     return(ehqform);
 }
Esempio n. 3
0
        private void barButtonItem查询_ItemClick(object sender, ItemClickEventArgs e)
        {
            ChannelQuantityQuery Frm = ChannelQuantityQuery.GetInstance();

            Frm.TopLevel = false;
            Frm.Parent   = this;
            Frm.Show();
            Frm.BringToFront();
        }
Esempio n. 4
0
        private void ChannelQuantity_Load(object sender, EventArgs e)
        {
            this.WindowState = FormWindowState.Maximized;
            ChannelQuantityQuery Frm = ChannelQuantityQuery.GetInstance();

            Frm.TopLevel = false;
            Frm.Parent   = this;
            Frm.Show();
            Frm.BringToFront();
        }
Esempio n. 5
0
 private void barButtonItem刷新_ItemClick(object sender, ItemClickEventArgs e)
 {
     ChannelQuantityQuery.RefreshEX();
 }