Пример #1
0
        protected void return_to_work_textbox_TextChanged(object sender, EventArgs e)
        {
            TextBox          return_to_work_textbox = (TextBox)sender;
            String           return_to_work         = return_to_work_textbox.Text;
            ListViewDataItem lvdi = (ListViewDataItem)return_to_work_textbox.NamingContainer;
            ListView         lv   = (ListView)lvdi.NamingContainer;
            String           id   = lv.DataKeys[lvdi.DataItemIndex].Values["id"].ToString();

            if (EmployeeFunctions.ReturnToWorkChanged(id, return_to_work))
            {
                MessageLabel.Text = "Saved " + return_to_work.ToString() + " on " + DateTime.Now.ToString();
            }
            else
            {
                MessageLabel.Text = "An Error Occurred.";
            }
        }
Пример #2
0
        protected void CardNumberTextBox_TextChanged(object sender, EventArgs e)
        {
            TextBox          CardNumberTextBox = (TextBox)sender;
            String           card_number       = CardNumberTextBox.Text;
            ListViewDataItem lvdi = (ListViewDataItem)CardNumberTextBox.NamingContainer;
            ListView         lv   = (ListView)lvdi.NamingContainer;
            String           id   = lv.DataKeys[lvdi.DataItemIndex].Values["id"].ToString();

            if (EmployeeFunctions.CardNumberChanged(id, card_number))
            {
                MessageLabel.Text = "Saved " + card_number.ToString() + " on " + DateTime.Now.ToString();
            }
            else
            {
                MessageLabel.Text = "An Error Occurred.";
            }
        }
Пример #3
0
        protected void LanguageDropDownList_SelectedIndexChanged(object sender, EventArgs e)
        {
            DropDownList     LanguageDropDownList = (DropDownList)sender;
            String           default_language     = LanguageDropDownList.SelectedValue;
            ListViewDataItem lvdi = (ListViewDataItem)LanguageDropDownList.NamingContainer;
            ListView         lv   = (ListView)lvdi.NamingContainer;
            String           id   = lv.DataKeys[lvdi.DataItemIndex].Values["id"].ToString();

            if (EmployeeFunctions.LanguageChanged(id, default_language))
            {
                MessageLabel.Text = "Saved " + default_language.ToString() + " on " + DateTime.Now.ToString();
            }
            else
            {
                MessageLabel.Text = "An Error Occurred.";
            }
        }
Пример #4
0
        protected void monitor_end_dateTextBox_TextChanged(object sender, EventArgs e)
        {
            TextBox          monitor_end_dateTextBox = (TextBox)sender;
            String           monitor_end_date        = monitor_end_dateTextBox.Text;
            ListViewDataItem lvdi = (ListViewDataItem)monitor_end_dateTextBox.NamingContainer;
            ListView         lv   = (ListView)lvdi.NamingContainer;
            String           id   = lv.DataKeys[lvdi.DataItemIndex].Values["id"].ToString();

            if (EmployeeFunctions.MonitorEndDateChanged(id, monitor_end_date))
            {
                MessageLabel.Text = "Saved " + monitor_end_date.ToString() + " on " + DateTime.Now.ToString();
            }
            else
            {
                MessageLabel.Text = "An Error Occurred.";
            }
        }
Пример #5
0
        protected void NotesTextBox_TextChanged(object sender, EventArgs e)
        {
            TextBox          NotesTextBox = (TextBox)sender;
            String           covid_notes  = NotesTextBox.Text;
            ListViewDataItem lvdi         = (ListViewDataItem)NotesTextBox.NamingContainer;
            ListView         lv           = (ListView)lvdi.NamingContainer;
            String           id           = lv.DataKeys[lvdi.DataItemIndex].Values["id"].ToString();

            if (EmployeeFunctions.covid_notes(id, covid_notes))
            {
                MessageLabel.Text = "Saved " + covid_notes.ToString() + " on " + DateTime.Now.ToString();
            }
            else
            {
                MessageLabel.Text = "An Error Occurred.";
            }
        }
Пример #6
0
        protected void covid_actual_return_dateTextBox_TextChanged(object sender, EventArgs e)
        {
            TextBox          covid_actual_return_dateTextBox = (TextBox)sender;
            String           covid_actual_return_date        = covid_actual_return_dateTextBox.Text;
            ListViewDataItem lvdi = (ListViewDataItem)covid_actual_return_dateTextBox.NamingContainer;
            ListView         lv   = (ListView)lvdi.NamingContainer;
            String           id   = lv.DataKeys[lvdi.DataItemIndex].Values["id"].ToString();

            if (EmployeeFunctions.CovidActualReturnDate(id, covid_actual_return_date))
            {
                MessageLabel.Text = "Saved " + covid_actual_return_date.ToString() + " on " + DateTime.Now.ToString();
            }
            else
            {
                MessageLabel.Text = "An Error Occurred.";
            }
        }
Пример #7
0
        protected void CovidSymptomsDropDownList_SelectedIndexChanged(object sender, EventArgs e)
        {
            DropDownList     CovidSymptomsDropDownList = (DropDownList)sender;
            String           CovidSymptoms             = CovidSymptomsDropDownList.SelectedValue.ToString();
            ListViewDataItem lvdi = (ListViewDataItem)CovidSymptomsDropDownList.NamingContainer;
            ListView         lv   = (ListView)lvdi.NamingContainer;
            String           id   = lv.DataKeys[lvdi.DataItemIndex].Values["id"].ToString();

            if (EmployeeFunctions.CovidSymptoms(id, CovidSymptoms))
            {
                MessageLabel.Text = "Saved " + CovidSymptoms.ToString() + " on " + DateTime.Now.ToString();
            }
            else
            {
                MessageLabel.Text = "An Error Occurred.";
            }
        }
Пример #8
0
        protected void covid_watch_listCheckBox_CheckedChanged(object sender, EventArgs e)
        {
            CheckBox         covid_watch_listCheckBox = (CheckBox)sender;
            String           checked_status           = covid_watch_listCheckBox.Checked.ToString();
            ListViewDataItem lvdi = (ListViewDataItem)covid_watch_listCheckBox.NamingContainer;
            ListView         lv   = (ListView)lvdi.NamingContainer;
            String           id   = lv.DataKeys[lvdi.DataItemIndex].Values["id"].ToString();

            if (EmployeeFunctions.CovidWatchList(id, checked_status))
            {
                MessageLabel.Text = "Saved " + checked_status.ToString() + " on " + DateTime.Now.ToString();
            }
            else
            {
                MessageLabel.Text = "An Error Occurred.";
            }
        }
Пример #9
0
        protected void SubmitLinkButton_Click(object sender, EventArgs e)
        {
            LinkButton SubmitLinkButton = (LinkButton)sender;

            ListViewDataItem lvdi         = (ListViewDataItem)SubmitLinkButton.NamingContainer;
            ListView         lv           = (ListView)lvdi.NamingContainer;
            String           payroll_id   = lv.DataKeys[lvdi.DataItemIndex].Values["payroll_id"].ToString();
            TextBox          BadgeTextBox = (TextBox)lvdi.FindControl("BadgeTextBox");
            String           card_number  = BadgeTextBox.Text;

            if (EmployeeFunctions.AddEmployee(payroll_id, card_number))
            {
                lv.DataBind();
            }
            else
            {
            }
        }