protected void rgap_needsource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e) { try { _obj_Rec_ApprovalProcess = new RECRUITMENT_APPROVALPROCESS(); _obj_Rec_ApprovalProcess.Mode = 1; _obj_Rec_ApprovalProcess.APPRO_ORGANISATION_ID = Convert.ToInt32(Session["ORG_ID"]); DataTable dt = Recruitment_BLL.get_EmpSetup(_obj_Rec_ApprovalProcess); if (dt.Rows.Count != 0) { Rg_ApproverProcess.DataSource = dt; } if (Rg_ApproverProcess.Items.Count > 0) { Rg_ApproverProcess.MasterTableView.CommandItemDisplay = GridCommandItemDisplay.None; } else { Rg_ApproverProcess.MasterTableView.CommandItemDisplay = GridCommandItemDisplay.Top; } } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_ApprovalProcess", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); } }
protected void lnk_edit_Command(object sender, CommandEventArgs e) { try { ClearControls(); btn_update.Visible = true; _obj_Rec_ApprovalProcess = new RECRUITMENT_APPROVALPROCESS(); _obj_Rec_ApprovalProcess.Mode = 2; _obj_Rec_ApprovalProcess.APPRO_ID = Convert.ToInt32(Convert.ToString(e.CommandArgument)); DataTable DT = Recruitment_BLL.get_EmpSetup(_obj_Rec_ApprovalProcess); lbl_AP_Id.Text = Convert.ToString(DT.Rows[0]["APPRO_ID"]); LinkButton lnkTemp = sender as LinkButton; GridDataItem item = lnkTemp.NamingContainer as GridDataItem; rcmb_1Level.SelectedValue = item["APPRO_APPROVER1_ID"].Text != " " ? item["APPRO_APPROVER1_ID"].Text : string.Empty; rcmb_1Level.Text = item["APPRO_APPROVER1"].Text != " " ? item["APPRO_APPROVER1"].Text : string.Empty; rcmb_2Level.SelectedValue = item["APPRO_APPROVER2_ID"].Text != " " ? item["APPRO_APPROVER2_ID"].Text : string.Empty; rcmb_2Level.Text = item["APPRO_APPROVER2"].Text != " " ? item["APPRO_APPROVER2"].Text : string.Empty; rcmb_3Level.SelectedValue = item["APPRO_APPROVER3_ID"].Text != " " ? item["APPRO_APPROVER3_ID"].Text : string.Empty; rcmb_3Level.Text = item["APPRO_APPROVER3"].Text != " " ? item["APPRO_APPROVER3"].Text : string.Empty; // //LoadBusinessUnit(); //// rcmb_BusinessUnitType.SelectedIndex = rcmb_BusinessUnitType.Items.FindItemIndexByValue(Convert.ToString(DT.Rows[0]["APPRO_BU_ID"])); // LoadEmployees(rcmb_1Level); // rcmb_1Level.SelectedIndex = rcmb_1Level.Items.FindItemIndexByValue(Convert.ToString(DT.Rows[0]["APPRO_APPROVER1_ID"])); // //LoadLevel2(); // LoadEmployees(rcmb_2Level); // rcmb_2Level.SelectedIndex = rcmb_2Level.Items.FindItemIndexByValue(Convert.ToString(DT.Rows[0]["APPRO_APPROVER2_ID"])); // //LoadLevel3(); // LoadEmployees(rcmb_3Level); // rcmb_3Level.SelectedIndex = rcmb_3Level.Items.FindItemIndexByValue(Convert.ToString(DT.Rows[0]["APPRO_APPROVER3_ID"])); //chk_Approver2.Checked = Convert.ToBoolean(DT.Rows[0]["APPRO_ISAPPROVER2"]); btn_Save.Visible = true; rcmb_2Level.Enabled = true; Rm_ApproverProcess_PAGE.SelectedIndex = 1; // rcmb_BusinessUnitType.Enabled = false; rcmb_1Level.Enabled = true; rcmb_1Level.Focus(); btn_Save.Visible = false; } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_ApprovalProcess", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); } }