예제 #1
0
        private void UPDATE_Click(object sender, EventArgs e)
        {
            if (Tele_No.Text == "" || Mob_No.Text == "" || Fax_No.Text == "" || E_ID.Text == "" || A_E_ID.Text == "")
            {
                MessageBox.Show("PLZ_FILL_RECOMMENDED_DATA__!!");
            }
            else
            {
                con.Open();
                SqlDataAdapter sda = new SqlDataAdapter("UPDATE PARTY SET Party_Name='" + Party_Name.Text + "',Head_Office='" + H_O.Text + "',State='" + City.Text + "',City='" + State.Text + "',Post_Code='" + Postcode.Text + "',Telephone_No='" + Tele_No.Text + "',Mobile_No='" + Mob_No + "',Fax_No='" + Fax_No.Text + "',Email_ID='" + E_ID.Text + "',Alternative_Email_ID='" + A_E_ID.Text + "',Website='" + Website.Text + "' WHERE Party_ID='" + Party_ID.Text + "'", con);
                sda.SelectCommand.ExecuteNonQuery();
                con.Close();

                Party_ID.Text   = "";
                Party_Name.Text = "";
                H_O.Text        = "";
                City.Text       = "";
                State.Text      = "";
                Postcode.Text   = "";
                Tele_No.Text    = "";
                Mob_No.Text     = "";
                Fax_No.Text     = "";
                E_ID.Text       = "";
                A_E_ID.Text     = "";
                Website.Text    = "";

                Party_ID.Focus();

                MessageBox.Show("UPDATED SUCCESSFULLY!!!");
            }
        }
예제 #2
0
        private void SAVE_Click(object sender, EventArgs e)
        {
            if (Party_ID.Text == "" || Party_Name.Text == "" || H_O.Text == "" || State.Text == "" || City.Text == "" || Post_Code.Text == "" || Tele_No.Text == "" || Mob_No.Text == "" || Fax_No.Text == "" || E_ID.Text == "" || A_E_ID.Text == "" || Website.Text == "" || Date.Text == "")
            {
                MessageBox.Show("PLEASE_FILL_ALL_FIELDS__!!");
            }
            else
            {
                con.Open();
                SqlDataAdapter sda = new SqlDataAdapter("INSERT INTO PARTY (Party_ID,Party_Name,Head_Office,State,City,Post_Code,Telephone_No,Mobile_No,Fax_No,Email_ID,Alternative_Email_ID,Website)VALUES('" + Party_ID.Text + "','" + Party_Name.Text + "','" + H_O.Text + "','" + State.Text + "','" + City.Text + "','" + Post_Code.Text + "','" + Tele_No.Text + "','" + Mob_No.Text + "','" + Fax_No.Text + "','" + E_ID.Text + "','" + A_E_ID.Text + "','" + Website.Text + "')", con);
                sda.SelectCommand.ExecuteNonQuery();
                con.Close();
                Party_ID.Text   = "";
                Party_Name.Text = "";
                H_O.Text        = "";
                State.Text      = "";
                City.Text       = "";

                Post_Code.Text = "";
                Tele_No.Text   = "";
                Mob_No.Text    = "";
                Fax_No.Text    = "";
                E_ID.Text      = "";
                A_E_ID.Text    = "";
                Website.Text   = "";
                Party_ID.Focus();
                MessageBox.Show("SAVE SUCCESSFULLY!!!");

                Add_Party_Details ds = new Add_Party_Details();
                this.Dispose(false);
                ds.Show();
            }
        }
        private void CLEAR_Click(object sender, EventArgs e)
        {
            Party_ID.Text   = "";
            Party_Name.Text = "";
            Party_ID.Focus();

            MessageBox.Show("ALL_DATA_CLEARED__!!");
        }
예제 #4
0
        private void CLEAR_Click(object sender, EventArgs e)
        {
            Party_ID.Text   = "";
            Party_Name.Text = "";
            H_O.Text        = "";
            City.Text       = "";
            State.Text      = "";
            Postcode.Text   = "";
            Tele_No.Text    = "";
            Mob_No.Text     = "";
            Fax_No.Text     = "";
            E_ID.Text       = "";
            A_E_ID.Text     = "";
            Website.Text    = "";

            Party_ID.Focus();
        }
        private void DELETE_Click(object sender, EventArgs e)
        {
            if (Party_ID.Text == "" || Party_Name.Text == "")
            {
                MessageBox.Show("PLEASE_FILL_ALL_RECOMMENDED_DATA_FIRST_!!");
            }
            else
            {
                con.Open();
                SqlCommand scd = new SqlCommand("DELETE FROM PARTY WHERE Party_ID='" + Party_ID.Text + "' and Party_Name='" + Party_Name.Text + "'", con);
                scd.ExecuteNonQuery();
                con.Close();
                Party_ID.Text   = "";
                Party_Name.Text = "";
                Party_ID.Focus();

                MessageBox.Show("DATA_DELETED_SUCCESSFULLY__!!");
            }
        }
예제 #6
0
        private void CLEAR_Click(object sender, EventArgs e)
        {
            //Party_ID.Text = "";
            Party_Name.Text = "";
            H_O.Text        = "";
            State.Text      = "";
            City.Text       = "";

            Post_Code.Text = "";
            Tele_No.Text   = "";
            Mob_No.Text    = "";
            Fax_No.Text    = "";
            E_ID.Text      = "";
            A_E_ID.Text    = "";
            Website.Text   = "";

            Party_ID.Focus();

            MessageBox.Show("ALL_CLEARED__");
        }