Ejemplo n.º 1
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();
            }
        }
Ejemplo n.º 2
0
        public void cmdLogs_Click(object sender, EventArgs e)
        {
            //this.Parent.Hide();

            //frmLog frm = new frmLog(LogDay);
            letLog frm = new letLog(LogDay);


            //frmLog frm = new frmLog(_ref_week);
            //frmLog frm = new frmLog(DateTime.Now);

            frm.ShowDialog();
            dacCache.RefreshTimebook(_ref_week, false);
            //qryGang.Requery();
            qryTimebook.Requery();

            refresh_alley(0);
            //this.Parent.Show();
        }