Exemplo n.º 1
0
        private void UPDATE_Click(object sender, EventArgs e)
        {
            if (Total.Text == "" || Advance_Pay.Text == "" || Balance.Text == "")
            {
                MessageBox.Show("PLZ_FILL_RECOMMENDED_DATA__!!");
            }
            else
            {
                con.Open();
                SqlDataAdapter sda = new SqlDataAdapter("UPDATE Vehicle_Daily_Entry SET Vehicle_ID='" + Vehicle_ID.Text + "',Challan_No='" + Challan_No.Text + "',Container_No='" + Container_No.Text + "',Party_ID='" + Party_ID.Text + "',Route='" + Route.Text + "',Date='" + Date.Text + "',Starting_Place='" + Start_Place.Text + "',Ending_Place='" + End_Place.Text + "',Total='" + Total.Text + "',Advance_Pay='" + Advance_Pay.Text + "',Balance='" + Balance.Text + "' WHERE Entry_ID='" + Entry_ID.Text + "'", con);
                sda.SelectCommand.ExecuteNonQuery();
                con.Close();

                Entry_ID.Text     = "";
                Vehicle_ID.Text   = "";
                Challan_No.Text   = "";
                Container_No.Text = "";
                Party_ID.Text     = "";
                Route.Text        = "";
                Date.Text         = "";

                Start_Place.Text = "";

                End_Place.Text   = "";
                Total.Text       = "";
                Advance_Pay.Text = "";
                Balance.Text     = "";

                Entry_ID.Focus();

                MessageBox.Show("DATA_UPDATED_SUCCESSFULLY___!!!");
            }
        }
        private void SAVE_Click(object sender, EventArgs e)
        {
            if (Entry_ID.Text == "" || Emp_ID.Text == "" || Emp_Name.Text == "" || Today_Date.Text == "" || IN_Time.Text == "" || OUT_Time.Text == "")
            {
                MessageBox.Show("PLEASE_FILL_ALL_DATA__!!!");
                Entry_ID.Focus();
            }
            else
            {
                con.Open();
                SqlDataAdapter sda = new SqlDataAdapter("INSERT INTO Staff_Daily_Entry(Entry_ID,Emp_ID,Emp_Name,Today_Date,IN_Time,OUT_Time)VALUES('" + Entry_ID.Text + "','" + Emp_ID.Text + "','" + Emp_Name.Text + "','" + Today_Date.Text + "','" + IN_Time.Text + "','" + OUT_Time.Text + "')", con);
                sda.SelectCommand.ExecuteNonQuery();
                con.Close();

                Entry_ID.Text   = "";
                Emp_ID.Text     = "";
                Emp_Name.Text   = "";
                Today_Date.Text = "";
                IN_Time.Text    = "";
                OUT_Time.Text   = "";

                Entry_ID.Focus();

                MessageBox.Show("DATA_SAVING_SUCCESSFULLY__!!!");
                Add_Emp_Daily_Entry ds = new Add_Emp_Daily_Entry();
                this.Dispose(false);
                ds.Show();
            }
        }
Exemplo n.º 3
0
        private void CLEAR_Click(object sender, EventArgs e)
        {
            Entry_ID.Text   = "";
            Vehicle_ID.Text = "";
            Entry_ID.Focus();

            MessageBox.Show("ALL_CLEARED__!!!");
        }
Exemplo n.º 4
0
        private void CLEAR_Click(object sender, EventArgs e)
        {
            Entry_ID.Text   = "";
            Emp_ID.Text     = "";
            Emp_Name.Text   = "";
            Today_Date.Text = "";
            IN_Time.Text    = "";
            OUT_Time.Text   = "";

            Entry_ID.Focus();
        }
        private void CLEAR_Click(object sender, EventArgs e)
        {
            //Entry_ID.Text = "";
            Emp_ID.Text     = "";
            Emp_Name.Text   = "";
            Today_Date.Text = "";
            IN_Time.Text    = "";
            OUT_Time.Text   = "";

            Entry_ID.Focus();

            MessageBox.Show("ALL_CLEAR_SUCCESSFULLY__!!!");
        }
Exemplo n.º 6
0
        private void DELETE_Click(object sender, EventArgs e)
        {
            if (Entry_ID.Text == "" || Vehicle_ID.Text == "")
            {
                MessageBox.Show("PLEASE_FILL_ALL_RECOMMENDED_DATA_FIRST_!!");
            }
            else
            {
                con.Open();
                SqlCommand scd = new SqlCommand("DELETE FROM Vehicle_Daily_Entry WHERE Entry_ID='" + Entry_ID.Text + "' and Vehicle_ID='" + Vehicle_ID.Text + "'", con);
                scd.ExecuteNonQuery();
                con.Close();
                Entry_ID.Text   = "";
                Vehicle_ID.Text = "";
                Entry_ID.Focus();

                MessageBox.Show("DATA_DELETED_SUCCESSFULLY__!!!");
            }
        }
Exemplo n.º 7
0
 private void SEARCH_Click(object sender, EventArgs e)
 {
     if (Entry_ID.Text == "")
     {
         MessageBox.Show("DATA_SEARCH_SUCCESSFULLY_!!!");
         Entry_ID.Focus();
     }
     else
     {
         con.Open();
         SqlDataAdapter sda = new SqlDataAdapter("SELECT * FROM Staff_Daily_Entry WHERE Entry_ID='" + Entry_ID.Text + "'", con);
         DataTable      dt  = new DataTable();
         sda.Fill(dt);
         Emp_ID.Text     = dt.Rows[0][1].ToString();
         Emp_Name.Text   = dt.Rows[0][2].ToString();
         Today_Date.Text = dt.Rows[0][3].ToString();
         IN_Time.Text    = dt.Rows[0][4].ToString();
         OUT_Time.Text   = dt.Rows[0][5].ToString();
     }
 }
Exemplo n.º 8
0
        private void CLEAR_Click(object sender, EventArgs e)
        {
            Entry_ID.Text     = "";
            Vehicle_ID.Text   = "";
            Challan_No.Text   = "";
            Container_No.Text = "";
            Party_ID.Text     = "";
            Route.Text        = "";
            Date.Text         = "";

            Start_Place.Text = "";

            End_Place.Text   = "";
            Total.Text       = "";
            Advance_Pay.Text = "";
            Balance.Text     = "";

            Entry_ID.Focus();

            MessageBox.Show("ALL_CLEARED___!!!");
        }
Exemplo n.º 9
0
        private void UPDATE_Click(object sender, EventArgs e)
        {
            if (Entry_ID.Text == "")
            {
                MessageBox.Show("PLZ_FILL_UP_RECOMMENDED_DATA__!!!");
            }
            else
            {
                con.Open();
                SqlDataAdapter sda = new SqlDataAdapter("UPDATE Staff_Daily_Entry SET IN_Time='" + IN_Time.Text + "',OUT_Time='" + OUT_Time.Text + "' WHERE Entry_ID='" + Entry_ID.Text + "'", con);
                sda.SelectCommand.ExecuteNonQuery();
                con.Close();

                Entry_ID.Text   = "";
                Emp_ID.Text     = "";
                Emp_Name.Text   = "";
                Today_Date.Text = "";
                IN_Time.Text    = "";
                OUT_Time.Text   = "";

                Entry_ID.Focus();
            }
        }
        private void SAVE_Click(object sender, EventArgs e)
        {
            if (Entry_ID.Text == "" || Vehicle_ID.Text == "" || Challan_No.Text == "" || Container_No.Text == "" || Party_ID.Text == "" || Route.Text == "" || Date.Text == "" || Start_Place.Text == "" || End_Place.Text == "" || Total.Text == "" || Advance_Pay.Text == "" || Balance.Text == "")
            {
                MessageBox.Show("PLZ_FILL_ALL_DATA__!!!");
            }
            else
            {
                con.Open();
                SqlDataAdapter sda = new SqlDataAdapter("INSERT INTO Vehicle_Daily_Entry (Entry_ID,Vehicle_ID,Challan_No,Container_No,Party_ID,Route,Date,Starting_Place,Ending_Place,Total,Advance_Pay,Balance)VALUES('" + Entry_ID.Text + "','" + Vehicle_ID.Text + "','" + Challan_No.Text + "','" + Container_No.Text + "','" + Party_ID.Text + "','" + Route.Text + "','" + Date.Text + "','" + Start_Place.Text + "','" + End_Place.Text + "','" + Total.Text + "','" + Advance_Pay.Text + "','" + Balance.Text + "')", con);
                sda.SelectCommand.ExecuteNonQuery();
                con.Close();

                Entry_ID.Text     = "";
                Vehicle_ID.Text   = "";
                Challan_No.Text   = "";
                Container_No.Text = "";
                Route.Text        = "";
                Party_ID.Text     = "";
                Date.Text         = "";

                Start_Place.Text = "";

                End_Place.Text   = "";
                Total.Text       = "";
                Advance_Pay.Text = "";
                Balance.Text     = "";

                Entry_ID.Focus();

                MessageBox.Show("SAVED_SUCCESSFULLY!!!!");

                Add_Vehicle_Daily_Entry ds = new Add_Vehicle_Daily_Entry();
                this.Dispose(false);
                ds.Show();
            }
        }