Esempio n. 1
0
        private void cmdSched_Click(object sender, EventArgs e)
        {
            do_profile();

            frmSched frm = new frmSched(DateTime.Now);

            ucList frmList = (ucList)(flpN.Controls[0]);
            //DataTable dt_gang = dacCache.GetGang();
            DataTable dt_gang = qryGang.GetDT();

            frm.LoadStart();

            int show_week_offset = (_current_week_offset * 7);

            if (dt_gang != null)
            {
                foreach (DataRow row in dt_gang.Rows)
                {
                    bool check = (bool)(row["Active"]);
                    if (!check)
                    {
                        continue;
                    }

                    //MessageBox.Show(row["EmpID"].ToString());
                    frm.LoadEmployee(row);
                }
            }

            frm.InitLoadReady();

            frm.ShowDialog();

            refresh_alley(0);
        }
Esempio n. 2
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. 3
0
        private void cmdRpt_Click(object sender, EventArgs e)
        {
            do_profile();

            ucList frmList = (ucList)(flpN.Controls[0]);
            //DataTable dt_gang = dacCache.GetGang();
            DataTable dt_gang = qryGang.GetDT();

            Form frm = new Form();

            frm.Size = new Size(540, 300);

            frm.Controls.Add(new ucRptTimbebook(dt_gang));

            frm.ShowDialog();
        }
Esempio n. 4
0
        private void load_active()
        {
            //for (int i = 0; i < 4; i++)
            //{
            //    tlpAlley.Controls.Add(new ucEmp("Emp Name", "604-512-6200", "604-278-1472", false), 0, i + 1);
            //    tlpAlley.RowStyles.Add(new RowStyle(SizeType.Absolute, ucEmp.uHeight));
            //}

            //dacCache.GangID = "default";

            ucList uc = new ucList();

            uc.PostChange += new ucList.ChangeHandler(frmList_PostChange);

            //uc.Size = flpN.Size;
            flpN.Controls.Add(uc);
        }
Esempio n. 5
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 !");
        }