示例#1
0
        public void setform()
        {
            this.Enabled = false;
            String          str = LVDayBook.Items[LVDayBook.FocusedItem.Index].SubItems[0].Text;
            DataTable       dt1 = conn.getdataset("select * from [contilindia].FormFormat where isactive=1 and type='P' and setdefault=1");
            DefaultPurchase bd  = new DefaultPurchase(this);
            Purchase        p   = new Purchase(this);

            if (dt1.Rows[0]["formname"].ToString() == bd.Text)
            {
                bd.updatemode(str, LVDayBook.Items[LVDayBook.FocusedItem.Index].SubItems[0].Text, 1);
                bd.Show();
            }
            else if (dt1.Rows[0]["formname"].ToString() == p.Text)
            {
                p.updatemode(str, LVDayBook.Items[LVDayBook.FocusedItem.Index].SubItems[0].Text, 1);
                p.Show();
            }
        }
示例#2
0
        private void btnnew_Click(object sender, EventArgs e)
        {
            DataTable       dt1 = conn.getdataset("select * from [Contilindia].[FormFormat] where isactive=1 and type='P' and setdefault=1");
            DefaultPurchase frm = new DefaultPurchase();

            Purchase p = new Purchase();

            if (dt1.Rows[0]["formname"].ToString() == frm.Text)
            {
                frm.MdiParent     = this.MdiParent;
                frm.StartPosition = FormStartPosition.CenterScreen;
                frm.Show();
            }
            else if (dt1.Rows[0]["formname"].ToString() == p.Text)
            {
                p.MdiParent     = this.MdiParent;
                p.StartPosition = FormStartPosition.CenterScreen;
                p.Show();
            }
        }