public skills Insert(skills id)
        {
            string        ConnectionString = IDManager.connection();
            SqlConnection con = new SqlConnection(ConnectionString);

            try
            {
                con.Open();
                SqlCommand cmd = new SqlCommand("SP_DMCS_INSERT_SKILLS", con);
                cmd.CommandType = System.Data.CommandType.StoredProcedure;
                cmd.Parameters.AddWithValue("@skills_description", id.skills_description);
                cmd.ExecuteReader();
                con.Close();
                con.Open();
                cmd             = new SqlCommand("SP_DMCS_GET_SKILLS", con);
                cmd.CommandType = System.Data.CommandType.StoredProcedure;
                cmd.Parameters.AddWithValue("@skills_description", id.skills_description);
                SqlDataReader rdr = cmd.ExecuteReader();
                if (rdr.HasRows)
                {
                    rdr.Read();
                    id.skills_id = rdr.GetInt32(0);
                }
            }
            catch (Exception ex)
            {
                id.SetColumnDefaults();
            }
            finally
            {
                con.Close();
            }
            return(id);
        }
 public skills Update_skills_select(int ID)
 {
     skills = skills.Select(ID);
     Update_skills_id_txt.Text          = Convert.ToString(skills.skills_id);
     Update_skills_description_txt.Text = Convert.ToString(skills.skills_description);
     return(skills);
 }
 public skills Delete_skills_select(int ID)
 {
     skills = skills.Select(ID);
     Delete_skills_id_txt_lbl.Text = Convert.ToString(skills.skills_id);
     Delete_skills_description_txt_lbl.Text = Convert.ToString(skills.skills_description);
     return skills;
 }
 public skills Insert(skills id)
 {
     string ConnectionString = IDManager.connection();
     SqlConnection con = new SqlConnection(ConnectionString);
     try
     {
     con.Open();
     SqlCommand cmd = new SqlCommand("SP_DMCS_INSERT_SKILLS", con);
     cmd.CommandType = System.Data.CommandType.StoredProcedure;
     cmd.Parameters.AddWithValue("@skills_description", id.skills_description);
     cmd.ExecuteReader();
     con.Close();
     con.Open();
     cmd = new SqlCommand("SP_DMCS_GET_SKILLS", con);
     cmd.CommandType = System.Data.CommandType.StoredProcedure;
     cmd.Parameters.AddWithValue("@skills_description", id.skills_description);
     SqlDataReader rdr = cmd.ExecuteReader();
     if (rdr.HasRows)
     {
         rdr.Read();
         id.skills_id = rdr.GetInt32(0);
     }
     }
     catch (Exception ex)
     {
     id.SetColumnDefaults();
     }
     finally
     {
     con.Close();
     }
     return id;
 }
        public Boolean Update(skills id)
        {
            string        ConnectionString = IDManager.connection();
            SqlConnection con = new SqlConnection(ConnectionString);

            try
            {
                con.Open();
                SqlCommand cmd = new SqlCommand("SP_DMCS_UPDATE_SKILLS", con);
                cmd.CommandType = System.Data.CommandType.StoredProcedure;
                cmd.Parameters.AddWithValue("@skills_id", id.skills_id);
                cmd.Parameters.AddWithValue("@skills_description", id.skills_description);
                cmd.ExecuteReader();
                con.Close();
                return(true);
            }
            catch (Exception ex)
            {
                return(false);
            }
            finally
            {
                con.Close();
            }
        }
 public skills skills_insert()
 {
     skills.skills_description = Insert_skills_description_txt.Text;
     skills = skills.Insert(skills);
     Insert_skills_GridView.DataBind();
     Update_skills_GridView.DataBind();
     Delete_skills_GridView.DataBind();
     return skills;
 }
 public skills skills_insert()
 {
     skills.skills_description = Insert_skills_description_txt.Text;
     skills = skills.Insert(skills);
     Insert_skills_GridView.DataBind();
     Update_skills_GridView.DataBind();
     Delete_skills_GridView.DataBind();
     return(skills);
 }
 public skills skills_update(int ID)
 {
     skills                    = skills.Select(ID);
     skills.skills_id          = Convert.ToInt32(Update_skills_id_txt.Text);
     skills.skills_description = Update_skills_description_txt.Text;
     skills.Update(skills);
     Insert_skills_GridView.DataBind();
     Update_skills_GridView.DataBind();
     Delete_skills_GridView.DataBind();
     return(skills);
 }
 public skills skills_update(int ID)
 {
     skills = skills.Select(ID);
     skills.skills_id = Convert.ToInt32(Update_skills_id_txt.Text);
     skills.skills_description = Update_skills_description_txt.Text;
     skills.Update(skills);
     Insert_skills_GridView.DataBind();
     Update_skills_GridView.DataBind();
     Delete_skills_GridView.DataBind();
     return skills;
 }
        public skills Select(int id)
        {
            skills        skills           = new skills();
            string        ConnectionString = IDManager.connection();
            SqlConnection con = new SqlConnection(ConnectionString);

            try
            {
                con.Open();
                SqlCommand cmd = new SqlCommand("SP_DMCS_SELECT_SKILLS", con);
                cmd.CommandType = System.Data.CommandType.StoredProcedure;
                cmd.Parameters.AddWithValue("@skills_id", id);
                SqlDataReader rdr = cmd.ExecuteReader();
                if (rdr.HasRows)
                {
                    rdr.Read();
                    if (!rdr.IsDBNull(0))
                    {
                        skills.skills_id = rdr.GetInt32(0);
                    }
                    else
                    {
                        skills.skills_id = 0;
                    }
                    if (!rdr.IsDBNull(1))
                    {
                        skills.skills_description = rdr.GetString(1);
                    }
                    else
                    {
                        skills.skills_description = " ";
                    }
                }
                else
                {
                    skills.SetColumnDefaults();
                }
            }
            catch (Exception ex)
            {
                skills.SetColumnDefaults();
                return(skills);
            }
            finally
            {
                con.Close();
            }
            return(skills);
        }
 public skills Insert_skills_select(int ID)
 {
     skills = skills.Select(ID);
     Insert_skills_description_txt.Text = Convert.ToString(skills.skills_description);
     return(skills);
 }
 /////////////////////////
 ////////////////////////
 ///////////////////////
 //////////////////////
 /////////////////////
 //Insert Tab Methods
 protected void Insert_Select_Record(object sender, EventArgs e)
 {
     skills = Insert_skills_select(Convert.ToInt32(Insert_skills_GridView.SelectedValue));
 }
 protected void UPDATE(object sender, EventArgs e)
 {
     skills = skills_update(Convert.ToInt32(Update_skills_GridView.SelectedValue));
 }
 public skills Select(int id)
 {
     skills skills = new skills();
     string ConnectionString = IDManager.connection();
     SqlConnection con = new SqlConnection(ConnectionString);
     try
     {
     con.Open();
     SqlCommand cmd = new SqlCommand("SP_DMCS_SELECT_SKILLS", con);
     cmd.CommandType = System.Data.CommandType.StoredProcedure;
     cmd.Parameters.AddWithValue("@skills_id", id);
     SqlDataReader rdr = cmd.ExecuteReader();
     if (rdr.HasRows)
     {
         rdr.Read();
         if (!rdr.IsDBNull(0))
         {
             skills.skills_id = rdr.GetInt32(0);
         }
         else
         {
             skills.skills_id = 0;
         }
         if (!rdr.IsDBNull(1))
         {
             skills.skills_description = rdr.GetString(1);
         }
         else
         {
             skills.skills_description = " ";
         }
         }
         else
         {
             skills.SetColumnDefaults();
         }
     }
     catch (Exception ex)
     {
     skills.SetColumnDefaults();
     return skills;
     }
     finally
     {
     con.Close();
     }
     return skills;
 }
 /////////////////////////
 ////////////////////////
 ///////////////////////
 //////////////////////
 /////////////////////
 //Update Tab Methods
 protected void Update_Select_Record(object sender, EventArgs e)
 {
     skills = Update_skills_select(Convert.ToInt32(Update_skills_GridView.SelectedValue));
 }
 /////////////////////////
 ////////////////////////
 ///////////////////////
 //////////////////////
 /////////////////////
 //Update Tab Methods
 protected void Update_Select_Record(object sender, EventArgs e)
 {
     skills = Update_skills_select(Convert.ToInt32(Update_skills_GridView.SelectedValue));
 }
 public skills Insert_skills_select(int ID)
 {
     skills = skills.Select(ID);
     Insert_skills_description_txt.Text = Convert.ToString(skills.skills_description);
     return skills;
 }
 protected void INSERT(object sender, EventArgs e)
 {
     skills = skills_insert();
 }
 /////////////////////////
 ////////////////////////
 ///////////////////////
 //////////////////////
 /////////////////////
 //Insert Tab Methods
 protected void Insert_Select_Record(object sender, EventArgs e)
 {
     skills = Insert_skills_select(Convert.ToInt32(Insert_skills_GridView.SelectedValue));
 }
 protected void UPDATE(object sender, EventArgs e)
 {
     skills = skills_update(Convert.ToInt32(Update_skills_GridView.SelectedValue));
 }
 public Boolean Update(skills id)
 {
     string ConnectionString = IDManager.connection();
     SqlConnection con = new SqlConnection(ConnectionString);
     try
     {
     con.Open();
     SqlCommand cmd = new SqlCommand("SP_DMCS_UPDATE_SKILLS", con);
     cmd.CommandType = System.Data.CommandType.StoredProcedure;
     cmd.Parameters.AddWithValue("@skills_id", id.skills_id);
     cmd.Parameters.AddWithValue("@skills_description", id.skills_description);
     cmd.ExecuteReader();
     con.Close();
     return true;
     }
     catch (Exception ex)
     {
     return false;
     }
     finally
     {
     con.Close();
     }
 }
 protected void INSERT(object sender, EventArgs e)
 {
     skills = skills_insert();
 }