protected void btnSaveSkill_Click(object sender, EventArgs e)
        {
            try
            {
                HRM_Skills skills = new HRM_Skills();

                skills.EID = Convert.ToString(Session["EID"]);
                skills.Skill_Specialization  = txtSpecialization.Text;
                skills.Skill_Description     = txtSkillDescription.Text;
                skills.Skill_ExtraActivities = txtExtratActivities.Text;
                skills.EDIT_DATE             = DateTime.Now;
                skills.EDIT_USER             = ((SessionUser)Session["SessionUser"]).UserId;
                skills.OCODE = ((SessionUser)Session["SessionUser"]).OCode;

                int result = employeeSetupDal.InsertEmpSkills(skills);
                if (result == 1)
                {
                    //lblMessage.Text = "Data Save Successfully";
                    getSkillsInfo();
                    ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), "text", "func('Data Save successfully!')", true);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }

            ClearSkillInformationField();
        }
예제 #2
0
 internal int DeleteskillInfoIdandOcode(string skillId, string OCODE)
 {
     try
     {
         int        SkillId = Convert.ToInt32(skillId);
         HRM_Skills objex   = _context.HRM_Skills.First(x => x.SkillId == SkillId);
         _context.HRM_Skills.DeleteObject(objex);
         _context.SaveChanges();
         return(1);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
예제 #3
0
 protected void btnSkillUpdate_Click(object sender, EventArgs e)
 {
     try
     {
         HRM_Skills skill = new HRM_Skills();
         skill.EID = Convert.ToString(Session["EID"]);
         skill.Skill_Specialization  = txtbxSpecialization.Text;
         skill.Skill_ExtraActivities = txtbxExtraCrricular.Text;
         skill.Skill_Description     = txtbxDescription.Text;
         if (btnSkillUpdate.Text == "Submit")
         {
             skill.EDIT_USER = ((SessionUser)Session["SessionUser"]).UserId;
             skill.EDIT_DATE = DateTime.Now;
             skill.OCODE     = ((SessionUser)Session["SessionUser"]).OCode;
             int result = employeeSetupDal.InsertEmpSkills(skill);
             if (result == 1)
             {
                 ClearSkills();
                 lblSkillMessage.Text = "Data Save Successfully";
             }
         }
         else
         {
             int skillId = Convert.ToInt32(hidSkillId.Value);
             int result  = employeeSetupDal.updateSkillInfo(skill, skillId);
             if (result == 1)
             {
                 lblSkillMessage.Text = "Data Update Successfully";
             }
         }
     }
     catch (Exception)
     {
         throw;
     }
 }