protected void lnk_Edit_Command(object sender, CommandEventArgs e) { try { ClearControls(); LoadGrade(); _obj_Rec_ApplicantGrade = new RECRUITMENT_APPLICANTGRADE(); _obj_Rec_ApplicantGrade.MODE = 6; _obj_Rec_ApplicantGrade.APPLGRADE_ID = Convert.ToInt32(e.CommandArgument); DataTable DT = Recruitment_BLL.get_ApplicantGrade(_obj_Rec_ApplicantGrade); if (DT.Rows.Count != 0) { lbl_GradeId.Text = Convert.ToString(DT.Rows[0]["APPLGRADE_ID"]); RCMB_Type.SelectedIndex = RCMB_Type.FindItemIndexByValue(Convert.ToString(DT.Rows[0]["APPGRADE_SETID"])); txt_Name.Text = Convert.ToString(DT.Rows[0]["APPGRADE_NAME"]); txt_Description.Text = Convert.ToString(DT.Rows[0]["APPLGRADE_DESCRIPTION"]); RCMB_Type.Enabled = false; txt_Name.Enabled = false; } btn_Update.Visible = true; RM_ApplicantGrade.SelectedIndex = 1; } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_applicantgrade", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); return; } }
public void LoadGrid() { try { DataTable DT = new DataTable(); _obj_Rec_ApplicantGrade = new RECRUITMENT_APPLICANTGRADE(); _obj_Rec_ApplicantGrade.ORGANISATION_ID = Convert.ToInt32(Session["ORG_ID"].ToString()); _obj_Rec_ApplicantGrade.MODE = 5; DT = Recruitment_BLL.get_ApplicantGrade(_obj_Rec_ApplicantGrade); if (DT.Rows.Count != 0) { RG_ApplicantGrade.DataSource = DT; // RG_ApplicantGrade.DataBind(); } else { DataTable dt1 = new DataTable(); RG_ApplicantGrade.DataSource = dt1; // RG_ApplicantGrade.DataBind(); return; } // RG_ApplicantGrade.DataSource = DT; } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_applicantgrade", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); return; } }
protected void Rcb_Assesment_DataBinding(object sender, EventArgs e) { try { _obj_Rec_ApplicantGrade = new RECRUITMENT_APPLICANTGRADE(); RadComboBox txtCompleteBy = (RadComboBox)sender; _obj_Rec_ApplicantGrade.MODE = 1; DataTable dt = new DataTable(); dt = Recruitment_BLL.get_ApplicantGrade(_obj_Rec_ApplicantGrade); txtCompleteBy.DataSource = dt; txtCompleteBy.DataTextField = "APPGRADE_NAME"; txtCompleteBy.DataValueField = "APPLGRADE_ID"; } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_InterviewAssesment", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); } }
protected void btn_Submit_Click(object sender, EventArgs e) { try { _obj_Rec_ApplicantGrade = new RECRUITMENT_APPLICANTGRADE(); // _obj_Rec_ApplicantGrade = new RECRUITMENT_APPLICANTGRADE _obj_Rec_ApplicantGrade.APPLGRADE_DESCRIPTION = txt_Description.Text.Replace("'", "''"); _obj_Rec_ApplicantGrade.APPLGRADE_CREATEDBY = Convert.ToInt32(Session["UserId"]); _obj_Rec_ApplicantGrade.APPLGRADE_CREADTEDATE = DateTime.Now; _obj_Rec_ApplicantGrade.APPLGRADE_LASTMDFBY = Convert.ToInt32(Session["UserId"]); _obj_Rec_ApplicantGrade.APPLGRADE_LASTMDFDATE = DateTime.Now; _obj_Rec_ApplicantGrade.ORGANISATION_ID = Convert.ToInt32(Session["ORG_ID"].ToString()); switch (((Button)sender).ID.ToUpper()) { case "BTN_UPDATE": _obj_Rec_ApplicantGrade.APPLGRADE_ID = Convert.ToInt32(lbl_GradeId.Text); _obj_Rec_ApplicantGrade.APPGRADE_SETID = Convert.ToInt32(RCMB_Type.SelectedItem.Value); _obj_Rec_ApplicantGrade.APPGRADE_NAME = txt_Name.Text.Replace("'", "''"); _obj_Rec_ApplicantGrade.MODE = 4; if (Convert.ToString(Recruitment_BLL.get_ApplicantGrade(_obj_Rec_ApplicantGrade).Rows[0]["Count"]) != "1") { Recruitment_BLL.ShowMessage(this, "This Combination Already Exists"); return; } _obj_Rec_ApplicantGrade.MODE = 3; if (Recruitment_BLL.set_ApplicantGrade(_obj_Rec_ApplicantGrade)) { Recruitment_BLL.ShowMessage(this, "Information Updated Successfully"); } else { Recruitment_BLL.ShowMessage(this, "Information Not Updated"); } LoadGrid(); RG_ApplicantGrade.DataBind(); RM_ApplicantGrade.SelectedIndex = 0; break; case "BTN_SUBMIT": _obj_Rec_ApplicantGrade.APPGRADE_SETID = Convert.ToInt32(RCMB_Type.SelectedItem.Value); _obj_Rec_ApplicantGrade.APPGRADE_NAME = txt_Name.Text.Replace("'", "''"); _obj_Rec_ApplicantGrade.MODE = 4; if (Convert.ToString(Recruitment_BLL.get_ApplicantGrade(_obj_Rec_ApplicantGrade).Rows[0]["Count"]) != "0") { Recruitment_BLL.ShowMessage(this, "This Combination Already Exists"); return; } _obj_Rec_ApplicantGrade.MODE = 2; if (Recruitment_BLL.set_ApplicantGrade(_obj_Rec_ApplicantGrade)) { Recruitment_BLL.ShowMessage(this, "Information Saved Successfully"); } else { Recruitment_BLL.ShowMessage(this, "Information Not Saved"); } LoadGrid(); RG_ApplicantGrade.DataBind(); RM_ApplicantGrade.SelectedIndex = 0; break; default: break; } } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_applicantgrade", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); return; } }