Exemplo 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);
        }
Exemplo n.º 2
0
        /*******************************************************************************************************************\
        *                                                                                                                 *
        \*******************************************************************************************************************/

        private void theclick(object sender)
        {
            //MessageBox.Show(this.ParentForm.Text);

            DateTime day = (DateTime)((TextBox)sender).Tag;


            if (day <= DateTime.Now)
            {
                //frmLog frm = new frmLog(day);
                letLog frm = new letLog(day);

                frm.ShowDialog();
            }
            else
            {
                frmSched frm = new frmSched(day);

                //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;
                        }
                        if (!row["EmpID"].Equals(_emp_id))
                        {
                            continue;
                        }

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

                frm.InitLoadReady();

                frm.ShowDialog();
                //frm.Show();
            }

            if (CueRequired)
            {
                ((CueWeek)this.ParentForm).Msg();
            }
        }