Beispiel #1
0
        private void AUD(EmployeeModel statement, int state, string id)
        {
            String msg = "";


            switch (state)
            {
            case 0:
                msg = "Row Inserted Successfully!";
                EmployeeMethods.PostMethod(statement);
                this.UpdateGrid();
                this.resetAll();
                break;

            case 1:
                msg = "Row Updated Successfully!";
                EmployeeMethods.PutMethod(statement, id);
                this.UpdateGrid();
                this.resetAll();
                break;

            case 2:
                msg = "Row Deleted Successfully!";
                EmployeeMethods.DeleteMethod(id);
                this.UpdateGrid();
                this.resetAll();
                break;
            }
            MessageBox.Show(msg);
        }