public static List<ExperienceModel> GetCandidateExperienceDetails(int userId)
        {
            SqlConnection con = DBUtils.getDBConnection();
            con.Open();

            SqlCommand command = new SqlCommand("select company, designation, period from dbo.Experience where user_id=" + userId + ";", con);
            SqlDataReader reader = command.ExecuteReader();

            List<ExperienceModel> experienceList = new List<ExperienceModel>();
            while(reader.Read())
            {
                ExperienceModel exp = new ExperienceModel();
                exp.company = Convert.ToString(reader[0]);
                exp.designation = Convert.ToString(reader[1]);
                exp.experience = Convert.ToInt32(reader[2]);

                experienceList.Add(exp);
            }

            con.Close();
            return experienceList;
        }
        public static void AddExperienceDetails(ExperienceModel exp)
        {
            SqlConnection con = DBUtils.getDBConnection();
            con.Open();

            SqlCommand command = new SqlCommand("insert into dbo.Experience (user_id, company, designation, period) values "
                + "(" + exp.user_id + ",'" + exp.company + "', '" + exp.designation + "', " + exp.experience +")" , con);
            command.ExecuteNonQuery();
            con.Close();
        }
 public string UpdateExperienceInfo(ExperienceModel expModel)
 {
     CandidateDAL.AddExperienceDetails(expModel);
     return "";
 }