protected void btn_Update_Click(object sender, EventArgs e) { try { _obj_Rec_SkillCategary = new RECRUITMENT_SKILLSCATEGARY(); _obj_Rec_SkillCategary.SKILLCAT_ID = Convert.ToInt32(lbl_id.Text); _obj_Rec_SkillCategary.SKILLCAT_NAME = Recruitment_BLL.ReplaceQuote(Convert.ToString(txt_Skillname.Text)); _obj_Rec_SkillCategary.SKILLCAT_DESCRIPTION = Recruitment_BLL.ReplaceQuote(Convert.ToString(txt_Description.Text)); _obj_Rec_SkillCategary.SKILLCAT_SKILLID = Convert.ToInt32(RCB_Skills.SelectedValue); _obj_Rec_SkillCategary.LASTMDFBY = 1; // ### Need to Get the Session _obj_Rec_SkillCategary.LASTMDFDATE = DateTime.Now; _obj_Rec_SkillCategary.MODE = 4; bool status = Recruitment_BLL.set_skillscategary(_obj_Rec_SkillCategary); if (status == true) { Recruitment_BLL.ShowMessage(this, "Skills Updated Succesfully"); loadgrid(); btn_Update.Visible = true; RM_Skillscategary.SelectedIndex = 0; } 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_skill", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); return; } }
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"); } }
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 btn_Submit_Click(object sender, EventArgs e) { try { _obj_Rec_Priority = new RECRUITMENT_INTERVIEW_PRIORITY(); _obj_Rec_Priority.PRIORITY_ORGANIZATIONID = Convert.ToInt32(Session["ORG_ID"].ToString()); switch (((Button)sender).ID.ToUpper()) { case "BTN_UPDATE": _obj_Rec_Priority.PRIORITY_VALUE = Convert.ToInt32(RNTB_PriorityValue.Value); _obj_Rec_Priority.PRIORITY_NAME = Recruitment_BLL.ReplaceQuote(Convert.ToString(txt_Priorityname.Text)); _obj_Rec_Priority.PRIORITY_ID = Convert.ToInt32(lbl_Id.Text); // _obj_Rec_Priority.PRIORITY_ID = Convert.ToInt32(priorityid); _obj_Rec_Priority.MODE = 2; _obj_Rec_Priority.PRIORITY_ORGANIZATIONID = Convert.ToInt32(Session["ORG_ID"].ToString()); if (Convert.ToString(Recruitment_BLL.get_InterviewPriority(_obj_Rec_Priority).Rows[0]["Count"]) != "1") { Recruitment_BLL.ShowMessage(this, "This Combination Already Exists"); return; } _obj_Rec_Priority.MODE = 3; if (Recruitment_BLL.set_InterviewPriority(_obj_Rec_Priority)) { Recruitment_BLL.ShowMessage(this, "Information Updated Successfully"); } else { Recruitment_BLL.ShowMessage(this, "Information Not Updated"); } LoadGrid(); RG_InterviewPriority.DataBind(); RM_InterviewPriority.SelectedIndex = 0; break; case "BTN_SUBMIT": _obj_Rec_Priority.PRIORITY_VALUE = Convert.ToInt32(RNTB_PriorityValue.Value); _obj_Rec_Priority.PRIORITY_NAME = Recruitment_BLL.ReplaceQuote(Convert.ToString(txt_Priorityname.Text)); _obj_Rec_Priority.PRIORITY_ORGANIZATIONID = Convert.ToInt32(Session["ORG_ID"].ToString()); _obj_Rec_Priority.MODE = 2; if (Convert.ToString(Recruitment_BLL.get_InterviewPriority(_obj_Rec_Priority).Rows[0]["Count"]) != "0") { Recruitment_BLL.ShowMessage(this, "This Combination Already Exists"); return; } _obj_Rec_Priority.MODE = 4; if (Recruitment_BLL.set_InterviewPriority(_obj_Rec_Priority)) { Recruitment_BLL.ShowMessage(this, "Information Saved Successfully"); } else { Recruitment_BLL.ShowMessage(this, "Information Not Saved"); } LoadGrid(); RG_InterviewPriority.DataBind(); RM_InterviewPriority.SelectedIndex = 0; break; default: break; } } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_InterviewPriority", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); return; } }