예제 #1
0
        private void Delete_All_Click(object sender, EventArgs e)
        {
            Manipulate_Look_Up MLK = new Manipulate_Look_Up();

            MLK.DeleteAll();
            this.Refresh();
            MessageBox.Show("All Records Deleted");
        }
예제 #2
0
        private void Save_Add_Edit_Button_Click(object sender, EventArgs e)
        {
            string S;
            Dictionary <string, object> Parameters = new Dictionary <string, object>();

            Parameters.Add("@isAdd", this.IsAdd);
            Parameters.Add("@Date", this.Start_Date_Picker.Text);
            if (this.Comp_ID_CB.Text != "")
            {
                Parameters.Add("@Comp_ID", Int32.Parse(this.Comp_ID_CB.Text));
                S = StoredProcedures.Add_Update_Match;
            }
            else
            {
                S = StoredProcedures.Add_Update_Match1;
            }
            Parameters.Add("@Opponent", this.Opponent_Text.Text);
            Parameters.Add("@Stadium", this.Staduim_Text.Text);
            Parameters.Add("@Match_Result", Our_Goals_CB.Text + "-" + Opponent_Goals_CB.Text);
            DBManager DBm = new DBManager();


            int Result = DBm.ExecuteNonQuery(S, Parameters);

            if (Result != 0)
            {
                MessageBox.Show("Changes Saved");

                Manipulate_Look_Up MLK = new Manipulate_Look_Up();
                string             B;
                if (IsAdd == 1)
                {
                    B = "User Added new Match With ON: " + this.Start_Date_Picker.Text + ".";
                }
                else if (IsAdd == 2)
                {
                    B = "User Edited Match ON: " + this.Start_Date_Picker.Text + ".";
                }
                else
                {
                    B = "User Deleted Record From Matches";
                }
                MLK.InsertData(CurrentUser.UserName, B);
            }
            else
            {
                MessageBox.Show("Error");
            }
            this.Close();
        }
예제 #3
0
 private void Delete_Record_Click(object sender, EventArgs e)
 {
     if (this.History.SelectedRows.Count == 1)
     {
         Manipulate_Look_Up MLK = new Manipulate_Look_Up();
         string             S   = this.History.Rows[this.History.CurrentRow.Index].Cells[0].ToString();
         MLK.DeleteAction(S);
         this.Refresh();
         MessageBox.Show("Record Deleted");
     }
     else
     {
         MessageBox.Show("Select ONE Record to Delete");
     }
 }
예제 #4
0
        private void Save_Add_Edit_Button_Click(object sender, EventArgs e)
        {
            Dictionary <string, object> Parameters = new Dictionary <string, object>();

            Parameters.Add("@isAdd", this.IsAdd);
            Parameters.Add("@FName", First_Name_Text.Text);
            Parameters.Add("@MINT", Middle_Name_Text.Text);
            Parameters.Add("@LName", Last_Name_Text.Text);
            Parameters.Add("@Adrees", Address_Text.Text);
            Parameters.Add("@E_Mail", E_Mail_Text.Text);
            Parameters.Add("@Mobile", Mobile_Text.Text);
            Parameters.Add("@Home_Phone", Home_Phone_Text.Text);
            Parameters.Add("@Nationality", Nationality_CB.Text);
            Parameters.Add("@BDATE", this.Birth_Date_Picker.Text);
            Parameters.Add("@Kit_Number", Kit_Number_CB.Text);
            Parameters.Add("@Position", Position_CB.Text);
            Parameters.Add("@Height", Height_CB.Text);
            Parameters.Add("@Weight", Weight_CB.Text);
            DBManager DBm    = new DBManager();
            int       Result = DBm.ExecuteNonQuery(StoredProcedures.Add_Update_Player, Parameters);

            if (Result != 0)
            {
                MessageBox.Show("Changes Saved");

                Manipulate_Look_Up MLK = new Manipulate_Look_Up();
                string             S;
                if (IsAdd == 1)
                {
                    S = "User Added new Player With Kit Number: " + this.Kit_Number_CB.Text + ".";
                }
                else if (IsAdd == 2)
                {
                    S = "User Edited Player With Kit Number: " + this.Kit_Number_CB.Text + ".";
                }
                else
                {
                    S = "User Deleted Record From Players";
                }
                MLK.InsertData(CurrentUser.UserName, S);
            }
            else
            {
                MessageBox.Show("Error");
            }
            this.Close();
        }
예제 #5
0
        private void Save_Add_Edit_Button_Click(object sender, EventArgs e)
        {
            Dictionary <string, object> Parameters = new Dictionary <string, object>();

            Parameters.Add("@isAdd", IsAdd);
            Parameters.Add("@Fname", this.First_Name_Text.Text);
            Parameters.Add("@MINIT", this.Middle_Name_Text.Text);
            Parameters.Add("@Lname", this.Last_Name_Text.Text);
            Parameters.Add("@Bdate", this.Birth_Date_Picker.Text);
            Parameters.Add("@ESSN", this.ESSN_Text.Text);
            Parameters.Add("@Address", this.Address_Text.Text);
            Parameters.Add("@E_Mail", this.E_Mail_Text.Text);
            Parameters.Add("@Mobile", this.Mobile_Text.Text);
            Parameters.Add("@Home_Phone", this.Home_Phone_Text.Text);
            Parameters.Add("@Nationality", this.Nationality_CB.Text);
            Parameters.Add("@Job_ID", Int32.Parse(this.Job_CB.Text));
            DBManager D      = new DBManager();
            int       Result = D.ExecuteNonQuery(StoredProcedures.Add_Update_Employee, Parameters);

            if (Result != 0)
            {
                MessageBox.Show("Changes Saved.");

                Manipulate_Look_Up MLK = new Manipulate_Look_Up();
                string             S;
                if (IsAdd == 1)
                {
                    S = "User Added new Employee With ESSN: " + this.ESSN_Text.Text + ".";
                }
                else if (IsAdd == 2)
                {
                    S = "User Edited Employee With ESSN: " + this.ESSN_Text.Text + ".";
                }
                else
                {
                    S = "User Deleted Record From Employees";
                }
                MLK.InsertData(CurrentUser.UserName, S);
            }
            else
            {
                MessageBox.Show("Error");
            }
            this.Close();
        }
예제 #6
0
        private void Save_Add_Edit_Button_Click(object sender, EventArgs e)
        {
            Dictionary <string, object> Parameters = new Dictionary <string, object>();

            Parameters.Add("@isAdd", this.IsAdd);
            Parameters.Add("@ID", Int32.Parse(this.ID_CB.Text));
            Parameters.Add("@Start_Date", this.Start_Date_Picker.Text);
            Parameters.Add("@End_Date", this.End_Date_Picker.Text);
            Parameters.Add("@Teams_Number", Int32.Parse(this.TeamNoCB.Text));
            Parameters.Add("@Country", this.Country_CB.Text);
            Parameters.Add("@Winner", this.Winner_Text.Text);
            Parameters.Add("@Type", Int32.Parse(this.CompNameCB.Text));

            DBManager DBm = new DBManager();


            int Result = DBm.ExecuteNonQuery(StoredProcedures.Add_Update_Comp_Par_In, Parameters);

            if (Result != 0)
            {
                MessageBox.Show("Changes Saved");

                Manipulate_Look_Up MLK = new Manipulate_Look_Up();
                string             S;
                if (IsAdd == 1)
                {
                    S = "User Added new Championship With ID: " + this.ID_CB.Text + ".";
                }
                else if (IsAdd == 2)
                {
                    S = "User Edited Championship With ID: " + this.ID_CB.Text + ".";
                }
                else
                {
                    S = "User Deleted Record From Championship";
                }
                MLK.InsertData(CurrentUser.UserName, S);
            }
            else
            {
                MessageBox.Show("Error");
            }
            this.Close();
        }
예제 #7
0
        private void Save_Add_Edit_Button_Click(object sender, EventArgs e)
        {
            Dictionary <string, object> Parameters = new Dictionary <string, object>();

            Parameters.Add("@isAdd", this.IsAdd);
            Parameters.Add("@ID", this.companyIDCB.Text);
            Parameters.Add("@Name", this.Name_Text.Text);
            Parameters.Add("@Activity", this.Activity_Text.Text);
            Parameters.Add("@Our_Agent", this.OurAgent_CB.Text);
            Parameters.Add("@Address", this.Address_Text.Text);
            Parameters.Add("@E_Mail", this.E_Mail_Text.Text);
            Parameters.Add("@Contact_Agent", this.ContactAgent_Text.Text);

            DBManager DBm    = new DBManager();
            int       Result = DBm.ExecuteNonQuery(StoredProcedures.Add_Update_Sponsor, Parameters);

            if (Result != 0)
            {
                MessageBox.Show("Changes Saved.");


                Manipulate_Look_Up MLK = new Manipulate_Look_Up();
                string             S;
                if (IsAdd == 1)
                {
                    S = "User Added new Sponsor With ID: " + this.companyIDCB.Text + ".";
                }
                else if (IsAdd == 2)
                {
                    S = "User Edited Sponsor With ID: " + this.companyIDCB.Text + ".";
                }
                else
                {
                    S = "User Deleted Record From Sponsors";
                }
                MLK.InsertData(CurrentUser.UserName, S);
            }
            else
            {
                MessageBox.Show("Error");
            }
            this.Close();
        }
예제 #8
0
        private void Save_Add_Edit_Button_Click(object sender, EventArgs e)
        {
            Dictionary <string, object> Parameters = new Dictionary <string, object>();

            Parameters.Add("@ID", Int32.Parse(this.TrainingIDCB.Text));
            Parameters.Add("@isAdd", this.IsAdd);
            Parameters.Add("@Date", this.Start_Date_Picker.Text);
            Parameters.Add("@Period", Int32.Parse(this.Period_Text.Text));
            Parameters.Add("@PlayGround", this.PlayGround_Text.Text);
            Parameters.Add("@Country", this.Country_CB.Text);
            Parameters.Add("@Type", Int32.Parse(this.Training_Type_CB.Text));

            DBManager DBm = new DBManager();


            int Result = DBm.ExecuteNonQuery(StoredProcedures.Add_Update_Training, Parameters);

            if (Result != 0)
            {
                MessageBox.Show("Changes Saved");

                Manipulate_Look_Up MLK = new Manipulate_Look_Up();
                string             S;
                if (IsAdd == 1)
                {
                    S = "User Added new Training With ID: " + this.TrainingIDCB.Text + ".";
                }
                else if (IsAdd == 2)
                {
                    S = "User Edited Training With ID: " + this.TrainingIDCB.Text + ".";
                }
                else
                {
                    S = "User Deleted Record From Training Schedule";
                }
                MLK.InsertData(CurrentUser.UserName, S);
            }
            else
            {
                MessageBox.Show("Error");
            }
            this.Close();
        }
예제 #9
0
        private void Save_Add_Edit_Button_Click(object sender, EventArgs e)
        {
            Dictionary <string, object> Parameters = new Dictionary <string, object>();

            Parameters.Add("@isAdd", this.IsAdd);
            Parameters.Add("@ID", Int32.Parse(this.ContractIDCB.Text));
            Parameters.Add("@Start_Date", this.Start_Date_Picker.Text);
            Parameters.Add("@End_Date", this.End_Date_Picker.Text);
            Parameters.Add("@Second_Party_ID", this.SecondPartyIDCB.Text);
            Parameters.Add("@Second_Party_Type", this.SecondPartyTypeCB.Text);
            Parameters.Add("@Content", Content_Text.Text);

            DBManager DBm    = new DBManager();
            int       Result = DBm.ExecuteNonQuery(StoredProcedures.Add_Update_Contracts, Parameters);

            if (Result != 0)
            {
                MessageBox.Show("Changes Saved.");

                Manipulate_Look_Up MLK = new Manipulate_Look_Up();
                string             S;
                if (IsAdd == 1)
                {
                    S = "User Added new Contract With ID: " + this.ContractIDCB.Text + ".";
                }
                else if (IsAdd == 2)
                {
                    S = "User Edited Contract With ID: " + this.ContractIDCB.Text + ".";
                }
                else
                {
                    S = "User Deleted Record From Contracts";
                }
                MLK.InsertData(CurrentUser.UserName, S);
            }
            else
            {
                MessageBox.Show("Error");
            }
            this.Close();
        }
예제 #10
0
        private void Save_Add_Edit_Button_Click(object sender, EventArgs e)
        {
            Dictionary <string, object> Parameters = new Dictionary <string, object>();

            Parameters.Add("@isAdd", this.IsAdd);
            Parameters.Add("@ID", this.InjuryIDCB.Text);
            Parameters.Add("@Player_Kit_No", this.PlayerInjuredCB.Text);
            Parameters.Add("@Injury_Type_ID", this.InjuryTypeCB.Text);
            Parameters.Add("@Doctor_ID", this.DoctorCB.Text);
            Parameters.Add("@IsHealed", this.Healed_CB.Text);
            Parameters.Add("@Date", this.Injury_Date_Picker.Text);

            DBManager DBm    = new DBManager();
            int       Result = DBm.ExecuteNonQuery(StoredProcedures.Add_Update_Injuries, Parameters);

            if (Result != 0)
            {
                MessageBox.Show("Changes Saved.");

                Manipulate_Look_Up MLK = new Manipulate_Look_Up();
                string             S;
                if (IsAdd == 1)
                {
                    S = "User Added new Injury With ID: " + this.InjuryIDCB.Text + ".";
                }
                else if (IsAdd == 2)
                {
                    S = "User Edited Injury With ID: " + this.InjuryIDCB.Text + ".";
                }
                else
                {
                    S = "User Deleted Record From Injuries";
                }
                MLK.InsertData(CurrentUser.UserName, S);
            }
            else
            {
                MessageBox.Show("Error");
            }
            this.Close();
        }
예제 #11
0
        private void Save_Click(object sender, EventArgs e)
        {
            Dictionary <string, object> Parameters = new Dictionary <string, object>();

            Parameters.Add("@isAdd", IsAdd);
            Parameters.Add("@ID", this.IDCB.Text);
            Parameters.Add("@Name", this.Name_Text.Text);
            Parameters.Add("@Describtion", this.Describtion_Text.Text);
            DBManager D      = new DBManager();
            int       Result = D.ExecuteNonQuery(StoredProcedures.Add_Update_Training_Type, Parameters);

            if (Result != 0)
            {
                MessageBox.Show("Changes Saved.");


                Manipulate_Look_Up MLK = new Manipulate_Look_Up();
                string             S;
                if (IsAdd == 1)
                {
                    S = "User Added new Trainig Type With ID: " + this.IDCB.Text + ".";
                }
                else if (IsAdd == 2)
                {
                    S = "User Edited Training Type With ID: " + this.IDCB.Text + ".";
                }
                else
                {
                    S = "User Deleted Record From Trainig Type";
                }
                MLK.InsertData(CurrentUser.UserName, S);
            }
            else
            {
                MessageBox.Show("Error");
            }
            this.Close();
        }
예제 #12
0
        private void Save_Click(object sender, EventArgs e)
        {
            Dictionary <string, object> Parameters = new Dictionary <string, object>();

            Parameters.Add("@Parameter", IsAdd);
            Parameters.Add("@ID", this.IDCB.Text);
            Parameters.Add("@Name", this.JobNameText.Text);
            Parameters.Add("@Describtion", this.JobDescribtionText.Text);
            Parameters.Add("@MngrJobID", this.MngrIDCB.Text);
            DBManager D      = new DBManager();
            int       Result = D.ExecuteNonQuery(StoredProcedures.ADD_EDIT_DELETE_Job, Parameters);

            if (Result != 0)
            {
                MessageBox.Show("Changes Saved.");

                Manipulate_Look_Up MLK = new Manipulate_Look_Up();
                string             S;
                if (IsAdd == 1)
                {
                    S = "User Added new Job With ID: " + this.IDCB.Text + ".";
                }
                else if (IsAdd == 2)
                {
                    S = "User Edited Job With ID: " + this.IDCB.Text + ".";
                }
                else
                {
                    S = "User Deleted Record From Job";
                }
                MLK.InsertData(CurrentUser.UserName, S);
            }
            else
            {
                MessageBox.Show("Erro");
            }
            this.Close();
        }