Ejemplo n.º 1
0
        private void UPDATE_Click(object sender, EventArgs e)
        {
            if (Basic_Pay.Text == "" || Deduction.Text == "")
            {
                MessageBox.Show("PLZ_FILL_RECOMMENDED_DATA__!!");
            }
            else
            {
                con.Open();
                SqlDataAdapter sda = new SqlDataAdapter("UPDATE SALARY SET Emp_ID='" + Emp_ID.Text + "',Date_Of_Joining='" + DOJ.Text + "',Date_Of_Retirement='" + DOR.Text + "',Basic_Pay='" + Basic_Pay.Text + "',Deduction='" + Deduction.Text + "',E_Salary_Code='" + ESC.Text + "' WHERE Salary_ID='" + Salary_ID.Text + "'", con);
                sda.SelectCommand.ExecuteNonQuery();
                con.Close();

                MessageBox.Show("UPDATED_SUCCESSFULLY!!");

                Salary_ID.Text = "";
                Emp_ID.Text    = "";
                DOJ.Text       = "";
                DOR.Text       = "";
                Basic_Pay.Text = "";
                Deduction.Text = "";
                ESC.Text       = "";
                Date.Text      = "";

                Emp_ID.Focus();
            }
        }
Ejemplo n.º 2
0
 private void button1_Click(object sender, EventArgs e)
 {
     MasterSearchTB.Clear();
     Emp_ID.Clear();
     TitleCB.SelectedIndex = -1;
     StartTimePicker.Value = DateTime.Now;
     EndTimePicker.Value   = DateTime.Now;
     Search();
 }
        private void CLEAR_Click(object sender, EventArgs e)
        {
            Status.Text = "";
            Emp_ID.Text = "";

            Emp_ID.Focus();

            MessageBox.Show("ALL_DATA_CLEARED__!!!");
        }
Ejemplo n.º 4
0
 /// <summary>
 /// Method calls procedure proEmpAttendanceEntry to update employee attendance in attendance register
 /// </summary>
 public void UpdateEmployeeAttandance()
 {
     SqlCmd             = new SqlCommand("ProEmpAttadanceUpdate", SqlCon);
     SqlCmd.CommandType = CommandType.StoredProcedure;
     SqlCmd.Parameters.Add("@Att_Date", Att_Date.ToString());
     SqlCmd.Parameters.Add("@Emp_ID", Emp_ID.ToString());
     SqlCmd.Parameters.Add("@Status", Status.ToString());
     SqlCmd.ExecuteNonQuery();
 }
 private void button1_Click(object sender, EventArgs e)
 {
     StartTimePicker.Value = DateTime.Now;
     EndTimePicker.Value   = DateTime.Now;
     MasterSearchTB.Clear();
     Emp_ID.Clear();
     yearcomboBox.SelectedIndex  = -1;
     MonthcomboBox.SelectedIndex = -1;
     SearchAllowance();
 }
Ejemplo n.º 6
0
        private void CLEAR_Click(object sender, EventArgs e)
        {
            Salary_ID.Text = "";
            Emp_ID.Text    = "";
            DOJ.Text       = "";
            DOR.Text       = "";
            Basic_Pay.Text = "";
            Deduction.Text = "";
            ESC.Text       = "";
            Date.Text      = "";

            Emp_ID.Focus();

            MessageBox.Show("All_CLEAR__");
        }
        private void Delete_Click(object sender, EventArgs e)
        {
            if (Status.Text == "" || Emp_ID.Text == "")
            {
                MessageBox.Show("PLEASE_FILL_ALL_RECOMMENDED_DATA_FIRST_!!");
            }
            else
            {
                con.Open();
                SqlCommand scd = new SqlCommand("DELETE FROM Employees WHERE Status='" + Status.Text + "' and Emp_ID='" + Emp_ID.Text + "'", con);
                scd.ExecuteNonQuery();
                con.Close();

                Status.Text = "";
                Emp_ID.Text = "";

                Emp_ID.Focus();


                MessageBox.Show("DATA_DELETED_SUCCESSFULLY___!!!");
            }
        }