How can people give themselves diabetes type 1?

Hi I know diabetes type 1 is not genetic or contagious but I was wondering if pancreatis could give you diabetes or anything else such as giving your body to much sugar so the insulin cannot keep up and works so vigorously, the beta cells get worn out. Any help would be appreciated! I was just curious!