Esempio n. 1
0
        /*******************************************************************************************************************\
        *                                                                                                                 *
        \*******************************************************************************************************************/

        void do_profile()
        {
            qryGang.BuildProfile();

            ucList frmList = (ucList)(flpN.Controls[0]);

            frmList.Reload();

            tlpAlley.SuspendLayout();

            while (tlpAlley.RowCount > 1)
            {
                int row = tlpAlley.RowCount - 1;
                for (int i = 0; i < tlpAlley.ColumnCount; i++)
                {
                    Control c = tlpAlley.GetControlFromPosition(i, row);
                    tlpAlley.Controls.Remove(c);
                    c.Dispose();
                }
                //tlpAlley.RowStyles.RemoveAt(row);
                tlpAlley.RowCount--;
            }

            bool ok = refresh_gang();

            tlpAlley.ResumeLayout();
            //tlpAlley.ResumeLayout(false);
            //tlpAlley.PerformLayout();

            if (!ok)
            {
                MessageBox.Show("No schedule !");
            }
        }
Esempio n. 2
0
        void do_query(string qry_name)
        {
            ucList uc = (ucList)flpN.Controls[0];

            uc.SetGangName(qry_name);

            qryGang.Requery();
            qryGang.GetView(qry_name, _ref_week.AddDays(-7), HeadCount * 7);
            //qryGang.GetView(qry_name);

            ucList frmList = (ucList)(flpN.Controls[0]);

            frmList.Reload();

            tlpAlley.SuspendLayout();

            while (tlpAlley.RowCount > 1)
            {
                int row = tlpAlley.RowCount - 1;
                for (int i = 0; i < tlpAlley.ColumnCount; i++)
                {
                    Control c = tlpAlley.GetControlFromPosition(i, row);
                    tlpAlley.Controls.Remove(c);
                    c.Dispose();
                }
                //tlpAlley.RowStyles.RemoveAt(row);
                tlpAlley.RowCount--;
            }

            bool ok = refresh_gang();

            tlpAlley.ResumeLayout();
            //tlpAlley.ResumeLayout(false);
            //tlpAlley.PerformLayout();

            //if (!ok)
            //    MessageBox.Show("No schedule !");
        }