public static Staffs.Staffs InsertStaff(object json, List <Staffs.Staffs> StaffList)
        {
            dynamic dynamicstaff = JsonConvert.DeserializeObject(json.ToString());

            Staffs.Staffs staff  = new Staffs.Staffs();
            int           typeno = (int)dynamicstaff.staffType;

            switch (typeno)
            {
            case 1:
                staff    = JsonConvert.DeserializeObject <TeachingStaffs>(json.ToString());
                staff.Id = StaffDB.GetId();
                return(staff);

            case 2:
                staff    = JsonConvert.DeserializeObject <AdministrativeStaff>(json.ToString());
                staff.Id = StaffDB.GetId();
                return(staff);

            case 3:
                staff    = JsonConvert.DeserializeObject <SupportStaffs>(json.ToString());
                staff.Id = StaffDB.GetId();
                return(staff);

            default:
                return(staff);
            }
        }