protected void lnk_Edit_Commnad(object sender, CommandEventArgs e)
 {
     try
     {
         clearfields();
         _obj_Rec_SkillCategary             = new RECRUITMENT_SKILLSCATEGARY();
         _obj_Rec_SkillCategary.MODE        = 2;
         _obj_Rec_SkillCategary.SKILLCAT_ID = Convert.ToInt32(e.CommandArgument);
         DataTable DT = Recruitment_BLL.get_skillscategary(_obj_Rec_SkillCategary);
         lbl_id.Text = Convert.ToString(DT.Rows[0]["SKILLCAT_ID"]);
         RCB_Skills.SelectedIndex        = Convert.ToInt32(RCB_Skills.Items.FindItemByValue(Convert.ToString(DT.Rows[0]["SKILLCAT_SKILLID"])));
         txt_Skillname.Text              = Recruitment_BLL.ReplaceQuote(Convert.ToString(DT.Rows[0]["SKILLCAT_NAME"]));
         txt_Description.Text            = Recruitment_BLL.ReplaceQuote(Convert.ToString(DT.Rows[0]["SKILLCAT_DESCRIPTION"]));
         RM_Skillscategary.SelectedIndex = 1;
         btn_Save.Visible        = true;
         btn_Save.Visible        = false;
         btn_Update.Visible      = true;
         txt_Description.Enabled = true;
         txt_Skillname.Enabled   = false;
         RCB_Skills.Enabled      = false;
     }
     catch (Exception ex)
     {
         SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_skill", ex.StackTrace, DateTime.Now);
         Response.Redirect("~/Frm_ErrorPage.aspx");
     }
 }
Example #2
0
    protected void loadgrid()
    {
        try
        {
            _obj_Rec_SkillCategary = new RECRUITMENT_SKILLSCATEGARY();
            _obj_Rec_SkillCategary.ORGANISATION_ID = Convert.ToInt32(Session["ORG_ID"]);
            _obj_Rec_SkillCategary.MODE            = 7;
            DataTable dt = Recruitment_BLL.get_skillscategary(_obj_Rec_SkillCategary);
            if (dt.Rows.Count != 0)
            {
                RG_SkillsCategary.DataSource = dt;
                RG_SkillsCategary.DataBind();
            }
            else
            {
                DataTable dt1 = new DataTable();
                RG_SkillsCategary.DataSource = dt1;
                RG_SkillsCategary.DataBind();

                return;
            }
        }
        catch (Exception ex)
        {
            SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_recruitmentskillscategary", ex.StackTrace, DateTime.Now);
            Response.Redirect("~/Frm_ErrorPage.aspx");
        }
    }
Example #3
0
    protected void btn_Save_Click(object sender, EventArgs e)
    {
        _obj_Rec_SkillCategary = new RECRUITMENT_SKILLSCATEGARY();
        try
        {
            //  _obj_Rec_SkillCategary.MODE = 3;
            _obj_Rec_SkillCategary.ORGANISATION_ID = Convert.ToInt32(Session["ORG_ID"]);
            //_obj_Pms_Ratings.RATINGS_NAME = Pms_Bll.ReplaceQuote(Convert.ToString(rtxt_RatingName.Text))

            _obj_Rec_SkillCategary.SKILLCAT_DESCRIPTION = Recruitment_BLL.ReplaceQuote(Convert.ToString(RT_SkillDesc.Text));
            _obj_Rec_SkillCategary.LASTMDFBY            = Convert.ToInt32(Session["USER_ID"]);
            _obj_Rec_SkillCategary.LASTMDFDATE          = DateTime.Now;
            _obj_Rec_SkillCategary.CREATEDBY            = Convert.ToInt32(Session["USER_ID"]);
            _obj_Rec_SkillCategary.CREATEDDATE          = DateTime.Now;

            _obj_Rec_SkillCategary.SKILLCAT_SKILLID = Convert.ToInt32(RCMB_Skills.SelectedItem.Value);
            _obj_Rec_SkillCategary.SKILLCAT_NAME    = Recruitment_BLL.ReplaceQuote(Convert.ToString(RT_Skillname.Text));


            _obj_Rec_SkillCategary.MODE = 8;
            DataTable dt_Skills = Recruitment_BLL.get_skillscategary(_obj_Rec_SkillCategary);
            if (Convert.ToString(dt_Skills.Rows[0]["Count"]) != "0")
            {
                Recruitment_BLL.ShowMessage(this, "This Combination Already Exists");
                return;
            }
            _obj_Rec_SkillCategary.MODE            = 3;
            _obj_Rec_SkillCategary.ORGANISATION_ID = Convert.ToInt32(Session["ORG_ID"]);
            bool status = Recruitment_BLL.set_skillscategary(_obj_Rec_SkillCategary);
            if (status == true)
            {
                Recruitment_BLL.ShowMessage(this, "Skills Inserted Succesfully");
                loadgrid();
                //clearfields();
                RM_SkillsCategary.SelectedIndex = 0;
                return;
            }
            else
            {
                Recruitment_BLL.ShowMessage(this, "Unable to Update the record,Execption Occured");
                return;
            }
        }
        catch (Exception ex)
        {
            SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_recruitmentskillscategary", ex.StackTrace, DateTime.Now);
            Response.Redirect("~/Frm_ErrorPage.aspx");
        }
    }
 protected void RG_Skillscategary_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
 {
     try
     {
         _obj_Rec_SkillCategary      = new RECRUITMENT_SKILLSCATEGARY();
         _obj_Rec_SkillCategary.MODE = 1;
         DataTable dt = Recruitment_BLL.get_skillscategary(_obj_Rec_SkillCategary);
         RG_Skillscategary.DataSource = dt;
     }
     catch (Exception ex)
     {
         SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_skill", ex.StackTrace, DateTime.Now);
         Response.Redirect("~/Frm_ErrorPage.aspx");
     }
 }