示例#1
0
        private void APOT_SETUP_Click(object sender, EventArgs e)
        {
            QUERY_SETUP ChildForm = new QUERY_SETUP();

            ChildForm.MdiParent   = this;
            ChildForm.Text        = "Ρύθμιση Εκτύπωσης ";                     // + m_ChildFormNumber;
            ChildForm.f_TableName = "EID";
            ChildForm.f_MENUID    = 2;
            ChildForm.Show();
        }
示例#2
0
        private void button5_Click(object sender, EventArgs e)
        {
            QUERY_SETUP ChildForm = new QUERY_SETUP();

            //System.Windows.Forms.Form
            ChildForm.MdiParent = this;
            // m_ChildFormNumber += 1;
            ChildForm.Text = "Ρύθμιση Εκτύπωσης ";                            // + m_ChildFormNumber;
            //if (m_ChildFormNumber % 2 == 1)
            //{
            //    ChildForm.BackColor = Color.Beige;
            //}
            //else
            //{
            //    ChildForm.BackColor = Color.Blue;
            //}
            ChildForm.f_TableName = "PEL";
            ChildForm.f_MENUID    = 1;
            ChildForm.Show();
        }
示例#3
0
        private void ΣχεδίασηToolStripMenuItem_Click_1(object sender, EventArgs e)
        //======================================================================================================
        {
            //allagh sxediashw

            //1 arxikh sxediash me adeia listboxes
            QUERY_SETUP ChildForm = new QUERY_SETUP();

            //System.Windows.Forms.Form


            // Make it a child of this MDI form before showing it.
            //  ChildForm.MdiParent = ff;
            ChildForm.Text = "Ρύθμιση Εκτύπωσης ";

            DataTable dt = functions.ExecuteSQLQuery("select * from TABLEFIELDS WHERE TABLENAME='" + f_TableName + "' and  NOT (FIELDDESCRIPTION is NULL)");
            int       n  = 0;
            string    c  = null;

            for (n = 0; n <= dt.Rows.Count - 1; n++)
            {
                string c1 = new string(' ', 200);
                c = (dt.Rows[n]["FIELDDESCRIPTION"].ToString() + c1).Substring(0, 200);

                string c2 = new  string(' ', 20);
                c = c + (dt.Rows[n]["FIELDNAME"].ToString() + c2).Substring(0, 20);

                c = c + dt.Rows[n]["FIELDTYPE"].ToString().Substring(0, 1);
                ChildForm.LFields.Items.Add(c);
            }

            //2. listboxes select , where k.l.p.
            DataTable sqlDT  = functions.ExecuteSQLQuery("SELECT * FROM NEWMENUS WHERE MENUNAME='" + f_MENUNAME + "' and MENU_ID=" + f_MENUID.ToString());
            string    MENUID = sqlDT.Rows[0]["MENU_ID"].ToString();

            c = sqlDT.Rows[0]["TSQLSELECT"].ToString();

            string[] TestArray = c.Split(charSeparators, StringSplitOptions.None);
            //Split(TestString)
            for (int i = 0; i <= TestArray.Length - 1; i++)
            {
                if (!string.IsNullOrEmpty(TestArray[i]))
                {
                    ChildForm.LSelect.Items.Add(TestArray[i]);
                }
            }

            //WHERE
            c = sqlDT.Rows[0]["TSQLWHERE"].ToString();
            string[] TestArray2 = c.Split(charSeparators, StringSplitOptions.None);
            //Split(TestString)
            for (int i = 0; i <= TestArray2.Length - 1; i++)
            {
                if (!string.IsNullOrEmpty(TestArray2[i]))
                {
                    ChildForm.LSearch.Items.Add(TestArray2[i]);
                }
            }

            // ORDER
            c = sqlDT.Rows[0]["TSQLORDER"].ToString();
            string[] TestArray3 = c.Split(charSeparators, StringSplitOptions.None);
            //Split(TestString)
            for (int i = 0; i <= TestArray3.Length - 1; i++)
            {
                if (!string.IsNullOrEmpty(TestArray3[i]))
                {
                    ChildForm.LOrder.Items.Add(TestArray3[i]);
                }
            }


            //f_MENUNAME
            ChildForm.f_MENUNAME  = f_MENUNAME;
            ChildForm.f_TableName = f_TableName;
            // ChildForm.Text=GRIDVIEW1.CurrentRow.Cells[1].Value.ToString();
            ChildForm.f_MENUID  = System.Convert.ToInt32(MENUID);
            ChildForm.MdiParent = MdiParent;
            ChildForm.Show();
        }