Create the stored procedure which will look somthing like this ..
Create Proc Ins_Department(@pDept Varchar(1000))
--First Check if the Department exists or not if not then insert..
If Not Exists (Select DName From Department Where DName = @pDept)
Call this proc from your front end..