protected void btn_Skill_Correct_Click(object sender, EventArgs e) { try { _obj_smhr_employee = new SMHR_EMPLOYEE(); _obj_smhr_employee.EMP_ID = Convert.ToInt32(Request.QueryString["ID"]); _obj_smhr_employee.Mode = 1; DataTable dt = BLL.get_EmpESS(_obj_smhr_employee); if (dt.Rows.Count != 0) { _lbl_Emp_Id = Convert.ToString(dt.Rows[0]["EMP_APPLICANT_ID"]); } _obj_smhr_applicant = new SMHR_APPLICANT(); bool status = false; _obj_smhr_applicant.OPERATION = operation.Update; _obj_smhr_applicant.APPSKL_ID = Convert.ToInt32(_lbl_ID); _obj_smhr_applicant.APPLICANT_ID = Convert.ToInt32(_lbl_Emp_Id); _obj_smhr_applicant.APPSKL_SKILL_ID = Convert.ToInt32(rcb_Skill.SelectedItem.Value); _obj_smhr_applicant.APPSKL_LASTUSED = Convert.ToInt32(rcb_YearLastUsed.SelectedItem.Text); _obj_smhr_applicant.APPSKL_EXPERT = Convert.ToInt32(rcb_ExpertLevel.SelectedValue); _obj_smhr_applicant.APPSKL_LASTMDFBY = Convert.ToInt32(Session["USER_ID"]); _obj_smhr_applicant.APPSKL_LASTMDFDATE = DateTime.Now; status = BLL.set_ApplicantSkills(_obj_smhr_applicant); LoadSkill(); clearSkillFields(); } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "Skills", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); } }
protected void btn_Qual_Correct_Click(object sender, EventArgs e) { try { _obj_smhr_employee = new SMHR_EMPLOYEE(); _obj_smhr_employee.EMP_ID = Convert.ToInt32(Request.QueryString["ID"]); _obj_smhr_employee.Mode = 1; DataTable dt1 = BLL.get_EmpESS(_obj_smhr_employee); if (dt1.Rows.Count != 0) { _lbl_Emp_Id = Convert.ToString(dt1.Rows[0]["EMP_APPLICANT_ID"]); } _obj_smhr_applicant = new SMHR_APPLICANT(); bool status = false; _obj_smhr_applicant.APPLICANT_ID = Convert.ToInt32(_lbl_Emp_Id); _obj_smhr_applicant.APPQFN_ID = Convert.ToInt32(_lbl_ID); _obj_smhr_applicant.APPQFN_QUALIFICATION_ID = Convert.ToInt32(ddl_Category.SelectedValue); _obj_smhr_applicant.APPQFN_INSTITUTE = Convert.ToString(txt_Institute.Text.Replace("'", "''")); _obj_smhr_applicant.APPQFN_PASSEDYEAR = Convert.ToInt32(txt_YearofPass.Value); _obj_smhr_applicant.APPQFN_PERCENTAGE = Convert.ToDouble(Convert.ToString(txt_Percentage.Value)); _obj_smhr_applicant.APPQFN_GRADE = Convert.ToString(ddl__Grade.SelectedItem.Value); _obj_smhr_applicant.APPQFN_LASTMDFBY = Convert.ToInt32(Session["USER_ID"]); _obj_smhr_applicant.APPQFN_LASTMDFDATE = DateTime.Now; _obj_smhr_applicant.OPERATION = operation.Update; status = BLL.set_AppQualification(_obj_smhr_applicant); LoadQualification(); clearQualFields(); ddl_Category.Enabled = true; } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "Qualification", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); } }
private void LoadCombos() { try { SMHR_LOGININFO _obj_SMHR_LoginInfo = new SMHR_LOGININFO(); _obj_SMHR_LoginInfo.ORGANISATION_ID = Convert.ToInt32(Session["ORG_ID"]); _obj_SMHR_LoginInfo.LOGIN_ID = Convert.ToInt32(Session["USER_ID"]); DataTable dt_BUDetails = BLL.get_Business_Units(_obj_SMHR_LoginInfo); rcmb_BusinessUnit.DataSource = dt_BUDetails; rcmb_BusinessUnit.DataValueField = "BUSINESSUNIT_ID"; rcmb_BusinessUnit.DataTextField = "BUSINESSUNIT_CODE"; rcmb_BusinessUnit.DataBind(); rcmb_BusinessUnit.Items.Insert(0, new RadComboBoxItem("Select")); SMHR_EMPLOYEE _obj_smhr_employee = new SMHR_EMPLOYEE(); _obj_smhr_employee.OPERATION = operation.Select; _obj_smhr_employee.ORGANISATION_ID = Convert.ToInt32(Session["ORG_ID"]); _obj_smhr_employee.EMP_LOGIN_ID = Convert.ToInt32(Session["USER_ID"]); DataTable dtEmp = BLL.get_Employee(_obj_smhr_employee); rcmb_Employee.DataSource = dtEmp; rcmb_Employee.DataTextField = "EMP_NAME"; rcmb_Employee.DataValueField = "EMP_ID"; rcmb_Employee.DataBind(); rcmb_Employee.Items.Insert(0, new Telerik.Web.UI.RadComboBoxItem("Select")); } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frmOverTimeCalcRM", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); } }
private int[] GetLeaves(int year, int month) { DataTable dtinex = new DataTable(); _obj_smhr_employee = new SMHR_EMPLOYEE(); _obj_smhr_employee.EMP_ID = Convert.ToInt32(Session["EMP_ID"]); //59; _obj_smhr_employee.Mode = 3; dtinex = BLL.get_EmpLeaveCalender(_obj_smhr_employee); List <int> leaves = new List <int>(); for (int day = 1; day <= DateTime.DaysInMonth(year, month); day++) { for (int dt = 0; dt <= dtinex.Rows.Count - 1; dt++) { DateTime date = new DateTime(year, month, day); if (date.Date.ToString() == dtinex.Rows[dt][0].ToString()) { leaves.Add(day); } } } return(leaves.ToArray()); }
//private bool checkRole() //{ // bool status = false; // SMHR_LOGININFO _obj_smhr_loginInfo = new SMHR_LOGININFO(); // _obj_smhr_loginInfo.LOGIN_USERNAME = Convert.ToString(rtxtUserName.Text); // _obj_smhr_loginInfo.OPERATION = operation.Select; // DataTable dt = BLL.get_Login(_obj_smhr_loginInfo); // if (dt.Rows.Count != 0) // { // if (Convert.ToString(dt.Rows[0]["LOGTYP_CODE"]) == "USERS") // { // status = true; // } // else // { // status = false; // } // } // return status; //} private bool checkRole() { bool status = false; bool flag = false; SMHR_EMPLOYEE _obj_smhr_employee = new SMHR_EMPLOYEE(); _obj_smhr_employee.OPERATION = operation.Select; _obj_smhr_employee.ORGANISATION_ID = Convert.ToInt32(Session["ORG_ID"]); DataTable dt = BLL.get_EMP(_obj_smhr_employee); if (dt.Rows.Count != 0) { for (int int_count = 0; int_count < dt.Rows.Count; int_count++) { if (Convert.ToString(Session["EMP_ID"]) == Convert.ToString(dt.Rows[int_count]["EMP_REPORTINGEMPLOYEE"])) { flag = true; status = false; } } if (flag == false) { status = true; } } return(status); }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { string dt = Convert.ToString(DateTime.Now.Year); txtyear.Text = Convert.ToString(dt); DataTable table = new DataTable(); table = GetMainTable(dt); RG_leavecalender.DataSource = table; SetUnAvailableDays(table, 1); SetSundays(table, Convert.ToInt32(dt), 2); SetWeekoffs(table, Convert.ToInt32(dt), 4); SetHolidys(table, Convert.ToInt32(dt), 8); SetLeaves(table, Convert.ToInt32(dt), 10); RG_leavecalender.DataBind(); int month_no = 1; foreach (GridDataItem dataItem in RG_leavecalender.MasterTableView.Items) { for (int i = 2; i <= 32; i++) { if (dataItem.Cells[i + 3].Text != " " && dataItem.Cells[i + 3].Text != "null") { int cellValue = Convert.ToInt32(dataItem.Cells[i + 3].Text); dataItem.Cells[i + 3].BackColor = GetColorForValue(cellValue); dataItem.Cells[i + 3].ForeColor = Color.White; dataItem.Cells[i + 3].Text = GetText(cellValue, i - 1, month_no, dt); } } month_no++; } txt1.BackColor = System.Drawing.Color.YellowGreen; txt2.BackColor = System.Drawing.Color.Blue; txt3.BackColor = System.Drawing.Color.Coral; string curr_year = Convert.ToString(DateTime.Now.Year); if (txtyear.Text == curr_year) { btnNext.Enabled = false; } else { btnNext.Enabled = true; } _obj_smhr_employee = new SMHR_EMPLOYEE(); _obj_smhr_employee.OPERATION = operation.Select; _obj_smhr_employee.EMP_ID = Convert.ToInt32(Session["EMP_ID"]); //dt_Details = new DataTable(); _obj_smhr_employee.ORGANISATION_ID = Convert.ToInt32(Session["ORG_ID"]); DataTable dt_Details = BLL.get_Employee(_obj_smhr_employee); DateTime doj = Convert.ToDateTime(dt_Details.Rows[0]["EMP_DOJ"]); prev_year = Convert.ToString(doj.Year); if (txtyear.Text == prev_year) { btnprevious.Enabled = false; } else { btnprevious.Enabled = true; } } }
private void LoadEmployee() { try { _obj_smhr_employee = new SMHR_EMPLOYEE(); _obj_smhr_employee.OPERATION = operation.Employee; if (rcmb_Scale.SelectedIndex > 0) { _obj_smhr_employee.EMP_GRADE = Convert.ToInt32(rcmb_Scale.SelectedItem.Value); _obj_smhr_employee.EMP_BUSINESSUNIT_ID = Convert.ToInt32(rcmb_BusinessUnit.SelectedItem.Value); } //obj_smhr_Period.ORGANISATION_ID = Convert.ToInt32(Session["ORG_ID"]); DataTable dt_Emp = BLL.getEmployee1(_obj_smhr_employee); rcmb_Employee.DataSource = dt_Emp; rcmb_Employee.DataValueField = "EMP_ID"; rcmb_Employee.DataTextField = "EMP_NAME"; rcmb_Employee.DataBind(); rcmb_Employee.Items.Insert(0, new RadComboBoxItem("select", null)); } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "MedicalStatement", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); } }
private void LoadNewContactDetails() { _obj_smhr_employee = new SMHR_EMPLOYEE(); _lbl_Emp_ID = Convert.ToString(Session["EMP_ID"]); _obj_smhr_employee.OPERATION = operation.Select; _obj_smhr_employee.EMP_ID = Convert.ToInt32(_lbl_Emp_ID.ToString()); DataTable dt = BLL.get_EMP_NEWCONTACTS(_obj_smhr_employee); if (dt.Rows.Count != 0) { rmtxt_MobileNo.Text = Convert.ToString(dt.Rows[0]["EMP_MOBILENO"]); rmtxt_LandlineNo.Text = Convert.ToString(dt.Rows[0]["EMP_LANDLINENO"]); rtxt_EmailID.Text = Convert.ToString(dt.Rows[0]["EMP_EMAILID"]); } if ((rmtxt_LandlineNo.Text != string.Empty) || (rmtxt_MobileNo.Text != string.Empty) || (rtxt_EmailID.Text != string.Empty)) { btn_Correct.Visible = false; btn_Update.Visible = true; } else { btn_Update.Visible = false; btn_Correct.Visible = true; } }
protected void btn_Correct_Click(object sender, EventArgs e) { try { //rmtxt_MobileNo.Enabled = true; //rmtxt_LandlineNo.Enabled = true; //rtxt_EmailID.Enabled = true; if (rmtxt_MobileNo.Text != string.Empty || rmtxt_LandlineNo.Text != string.Empty || rtxt_EmailID.Text != string.Empty) { _obj_smhr_employee = new SMHR_EMPLOYEE(); _lbl_Emp_ID = Convert.ToString(Session["EMP_ID"]); _obj_smhr_employee.OPERATION = operation.Insert1; _obj_smhr_employee.EMP_MOBILENO = Convert.ToString(rmtxt_MobileNo.Text.Replace("'", "''")); _obj_smhr_employee.EMP_LANDLINENO = Convert.ToString(rmtxt_LandlineNo.Text.Replace("'", "''")); _obj_smhr_employee.EMP_EMAILID = Convert.ToString(rtxt_EmailID.Text.Replace("'", "''")); _obj_smhr_employee.EMP_ID = Convert.ToInt32(_lbl_Emp_ID); BLL.set_EMP_NEWCONTACTS(_obj_smhr_employee); BLL.ShowMessage(this, "Records Inserted Successfully"); } else { BLL.ShowMessage(this, "Please Enter Atleast one Value."); } LoadNewContactDetails(); } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "Contact", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); } }
private void LoadPensionAmount() { try { SMHR_EMPLOYEE objEmployee = new SMHR_EMPLOYEE(); objEmployee.EMP_ID = Convert.ToInt32(rcmb_Employee.SelectedValue); objEmployee.ORGANISATION_ID = Convert.ToInt32(Session["ORG_ID"]); objEmployee.BUID = Convert.ToInt32(rcmb_BusinessUnit.SelectedValue); DataTable dtPensionAmt = BLL.get_PensionFNF(objEmployee); if (dtPensionAmt.Rows.Count > 0) { rtxt_TotPensionAmt.Text = Convert.ToString(dtPensionAmt.Rows[0]["FFS_AMOUNT"]); rtxt_AmtDisbursed.Text = Convert.ToString(dtPensionAmt.Rows[0]["WITHDRAWL"]); rtxt_BalAmt.Text = Convert.ToString(dtPensionAmt.Rows[0]["WITHDRAWL_BALANCE"]); hdnFFSID.Value = Convert.ToString(dtPensionAmt.Rows[0]["FFS_ID"]); //rtxt_Amount.Text = Convert.ToString(Convert.ToDouble(dtPensionAmt.Rows[0]["FFS_AMOUNT"]) - Convert.ToDouble(dtPensionAmt.Rows[0]["WITHDRAWL"])); //rtxt_Amount.MaxValue = Convert.ToDouble(dtPensionAmt.Rows[0]["WITHDRAWL_BALANCE"]); } else { rtxt_TotPensionAmt.Text = string.Empty; rtxt_AmtDisbursed.Text = string.Empty; rtxt_BalAmt.Text = string.Empty; hdnFFSID.Value = null; } } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_PensionFFS", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); } }
private void getBirthday() { try { SMHR_EMPLOYEE _obj_smhr_Employee = new SMHR_EMPLOYEE(); _obj_smhr_Employee.ORGANISATION_ID = Convert.ToInt32(Session["ORG_ID"]); DataTable dtDetails = BLL.get_Birthday(_obj_smhr_Employee); if (dtDetails.Rows.Count != 0) { RTicker.DataSource = dtDetails; RTicker.DataTextField = "EMPNAME"; RTicker.DataBind(); tr_bday.Visible = true; lbl_Birthday.Visible = true; } else { //lbl_Reminders.Text = "NO BIRTHDAYS TODAY"; tr_bday.Visible = false; lbl_Birthday.Visible = false; } } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_Dashboradmngr", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); } }
protected void ddl_BusinessUnit_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e) { try { _obj_smhr_employee = new SMHR_EMPLOYEE(); _obj_smhr_employee.OPERATION = operation.Empty; _obj_smhr_employee.EMP_BUSINESSUNIT_ID = Convert.ToInt32(ddl_BusinessUnit.SelectedValue); _obj_smhr_employee.EMPSALDTLS_PRDDTL_ID = Convert.ToInt32(ddl_PeriodElements.SelectedValue); DataTable dt_Details = BLL.get_PayBusinessUnit(_obj_smhr_employee); if (dt_Details.Rows.Count != 0) { chkSalary_List.DataSource = dt_Details; chkSalary_List.DataValueField = "EMP_SALALRYSTRUCT_ID"; chkSalary_List.DataTextField = "SALARYSTRUCT_CODE"; chkSalary_List.DataBind(); lbl_SalaryStruct.Visible = true; chkSalary_List.Visible = true; } else { lbl_SalaryStruct.Visible = false; chkSalary_List.Visible = false; } } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_Retropay", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); } }
protected void rcmb_Relation_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e) { try { if (rcmb_Relation.SelectedIndex > 0) { SMHR_EMPLOYEE objRelation = new SMHR_EMPLOYEE(); objRelation.EMPFMDTL_EMP_ID = Convert.ToInt32(rcmb_Employee.SelectedValue); objRelation.EMPFMDTL_EMPREL_ID = Convert.ToInt32(rcmb_Relation.SelectedValue); objRelation.ORGANISATION_ID = Convert.ToInt32(Session["ORG_ID"]); objRelation.OPERATION = operation.Chk; DataTable dtRelations = BLL.get_EmployeeFamily(objRelation); if (dtRelations.Rows.Count > 0) { rtxt_Beneficiary.Text = Convert.ToString(dtRelations.Rows[0]["EMPFMDTL_NAME"]); } else { rtxt_Beneficiary.Text = string.Empty; } } else { rtxt_Beneficiary.Text = string.Empty; } } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_PensionFFS", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); } }
private void LoadRelation() { try { rcmb_Relation.Items.Clear(); rcmb_Relation.Text = string.Empty; SMHR_EMPLOYEE objRelation = new SMHR_EMPLOYEE(); objRelation.EMPFMDTL_EMP_ID = Convert.ToInt32(rcmb_Employee.SelectedValue); objRelation.ORGANISATION_ID = Convert.ToInt32(Session["ORG_ID"]); objRelation.OPERATION = operation.Check; DataTable dtRelations = BLL.get_EmployeeFamily(objRelation); if (dtRelations.Rows.Count > 0) { rcmb_Relation.DataSource = dtRelations; rcmb_Relation.DataTextField = "EMPFMDTL_EMPREL_NAME"; rcmb_Relation.DataValueField = "EMPFMDTL_EMPREL_ID"; rcmb_Relation.DataBind(); rcmb_Relation.Items.Insert(0, new RadComboBoxItem("Select", "0")); } else { rcmb_Relation.Items.Insert(0, new RadComboBoxItem("Select", "0")); //rfv_rcmb_Relation.Visible = false; } } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_PensionFFS", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); } }
private void LoadQualification() { try { _obj_smhr_employee = new SMHR_EMPLOYEE(); _obj_smhr_employee.EMP_ID = Convert.ToInt32(Request.QueryString["ID"]); _obj_smhr_employee.Mode = 1; DataTable dt1 = BLL.get_EmpESS(_obj_smhr_employee); if (dt1.Rows.Count != 0) { _lbl_Emp_Id = Convert.ToString(dt1.Rows[0]["EMP_APPLICANT_ID"]); } _obj_smhr_applicant = new SMHR_APPLICANT(); _obj_smhr_applicant.APPQFN_APPLICANT_ID = Convert.ToInt32(_lbl_Emp_Id); _obj_smhr_applicant.OPERATION = operation.Check; DataTable dt = BLL.get_ApplicantQualification(_obj_smhr_applicant); RG_Qualification.DataSource = dt; RG_Qualification.DataBind(); } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "Qualification", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); } }
private void LoadEmployees() { try { rcmb_Employee.Items.Clear(); rcmb_Employee.Text = string.Empty; SMHR_EMPLOYEE objEmployee = new SMHR_EMPLOYEE(); objEmployee.ORGANISATION_ID = Convert.ToInt32(Session["ORG_ID"]); objEmployee.EMP_BUSINESSUNIT_ID = Convert.ToInt32(rcmb_BusinessUnit.SelectedValue); if (rcmb_Directorate.SelectedIndex > 0) { objEmployee.EMP_DIRECTORATE_ID = Convert.ToInt32(rcmb_Directorate.SelectedValue); } if (rcmb_Department.SelectedIndex > 0) { objEmployee.EMP_DEPARTMENT_ID = Convert.ToInt32(rcmb_Department.SelectedValue); } objEmployee.OPERATION = operation.Chk; DataTable dtEmployees = BLL.get_Employeedetail(objEmployee); rcmb_Employee.DataSource = dtEmployees; rcmb_Employee.DataTextField = "EMPLOYEENAME"; rcmb_Employee.DataValueField = "EMP_ID"; rcmb_Employee.DataBind(); rcmb_Employee.Items.Insert(0, new RadComboBoxItem("Select", "0")); } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_PensionFFS", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); } }
protected void rcmb_ReportedByEmployee_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e) { try { if (rcmb_ReportedByEmployee.SelectedValue != string.Empty) { SMHR_EMPLOYEE _obj_Smhr_Employee = new SMHR_EMPLOYEE(); _obj_Smhr_Employee.ORGANISATION_ID = OrganizationID; _obj_Smhr_Employee.EMP_ID = Convert.ToInt32(rcmb_ReportedByEmployee.SelectedValue); DataTable dtData = BLL.get_GrievanceEmployee(_obj_Smhr_Employee); if (dtData.Rows.Count <= 0) { BLL.ShowMessage(this, "Please Select Reported By correctly"); return; } //rtxt_ReportedByEmpName.Text = dtData.Rows[0]["EMPNAME"].ToString(); rtxt_ReportedByEmpPosition.Text = dtData.Rows[0]["POSITIONS_CODE"].ToString(); rtxt_ReportedByDirectorate.Text = dtData.Rows[0]["DIRECTORATE_CODE"].ToString(); rtxt_ReportedByDepartment.Text = dtData.Rows[0]["DEPARTMENT_CODE"].ToString(); rtxt_ReportedByBU.Text = dtData.Rows[0]["BUSINESSUNIT_CODE"].ToString(); } } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "RecordIncident", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); } }
protected void rcmb_Employee_SelectedIndexChanged(object o, Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs e) { try { if (rcmb_Employee.SelectedIndex > 0) { int empID = Convert.ToInt32(rcmb_Employee.SelectedValue); SMHR_EMPLOYEE _obj_smhr_employee = new SMHR_EMPLOYEE(); _obj_smhr_employee.OPERATION = operation.Select; _obj_smhr_employee.EMP_ID = empID; _obj_smhr_employee.ORGANISATION_ID = Convert.ToInt32(Session["ORG_ID"]); DataTable dt_Details = BLL.get_Employee(_obj_smhr_employee); if (dt_Details.Rows.Count > 0) { LoadBusinessUnits(); } rcmb_BusinessUnit.SelectedIndex = rcmb_BusinessUnit.Items.FindItemIndexByValue(Convert.ToString(dt_Details.Rows[0]["EMP_BUSINESSUNIT_ID"])); } //else //{ // BLL.ShowMessage(this, "Please select Employee"); // rcmb_Employee.Focus(); // return; //} } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frmOverTimeCalcRM", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); } }
private void getDetails() { try { txt_Address.Text = string.Empty; _obj_smhr_employee = new SMHR_EMPLOYEE(); _obj_smhr_employee.EMP_ID = Convert.ToInt32(Request.QueryString["ID"]); _obj_smhr_employee.Mode = 1; DataTable dt = BLL.get_EmpESS(_obj_smhr_employee); if (dt.Rows.Count != 0) { _lbl_Emp_Id = Convert.ToString(dt.Rows[0]["EMP_APPLICANT_ID"]); _lbl_empCode = Convert.ToString(dt.Rows[0]["EMP_EMPCODE"]); lblTitle.Text = Convert.ToString(dt.Rows[0]["APPLICANT_TITLE"]); lblfirstname.Text = Convert.ToString(dt.Rows[0]["APPLICANT_FIRSTNAME"]); lblLastName.Text = Convert.ToString(dt.Rows[0]["APPLICANT_LASTNAME"]); lblMiddlename.Text = Convert.ToString(dt.Rows[0]["APPLICANT_MIDDLENAME"]); lblMaritalstatus.Text = Convert.ToString(dt.Rows[0]["APPLICANT_MARITALSTATUS"]); lblDOB.Text = Convert.ToString(dt.Rows[0]["APPLICANT_DOB"]); lblDOJ.Text = Convert.ToString(dt.Rows[0]["EMP_DOJ"]); lblGender.Text = Convert.ToString(dt.Rows[0]["APPLICANT_GENDER"]); txt_Address.Text = Convert.ToString(dt.Rows[0]["APPLICANT_ADDRESS"]); lblGrosssal.Text = Convert.ToString(dt.Rows[0]["EMP_GROSSSAL"]); lblBasicPay.Text = Convert.ToString(dt.Rows[0]["EMP_BASIC"]); lblBusinessunit.Text = Convert.ToString(dt.Rows[0]["BUSINESSUNIT_CODE"]); lblempstatus.Text = Convert.ToString(dt.Rows[0]["EMP_EMPLOYEETYPE"]); lblGrade.Text = Convert.ToString(dt.Rows[0]["EMPLOYEEGRADE_CODE"]); lblJob.Text = Convert.ToString(dt.Rows[0]["JOB"]); lblLeaveStruct.Text = Convert.ToString(dt.Rows[0]["LEAVESTRUCT_CODE"]); lblNoticeperiod.Text = Convert.ToString(dt.Rows[0]["EMP_NOTICEPERIOD"]); lblPosition.Text = Convert.ToString(dt.Rows[0]["POSITIONS"]); lblsalarystruct.Text = Convert.ToString(dt.Rows[0]["SALARYSTRUCT_CODE"]); lblShift.Text = Convert.ToString(dt.Rows[0]["SHIFT"]); //rtxt_Supervisor.Text = Convert.ToString(dt.Rows[0]["REPORTINGEMPLOYEE"]); lblPaymode.Text = Convert.ToString(dt.Rows[0]["PAYMENTMODE"]); //lblGrade.Text = Convert.ToString(dt.Rows[0]["GRADE"]); if (Convert.ToString(dt.Rows[0]["EMPREPORTINGEMPLOYEE"]) != "") { lblSupervisor.Text = Convert.ToString(dt.Rows[0]["EMPREPORTINGEMPLOYEE"]); } else { BLL.ShowMessage(this, "No Supervisor is Assigned for this Employee"); } } } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "Personal", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); } }
protected void rad_Employee_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e) { try { if (rad_Employee.SelectedIndex > 0) { _obj_smhr_employee = new SMHR_EMPLOYEE(); _obj_smhr_employee.OPERATION = operation.GetEmployeeDOJDOB; _obj_smhr_employee.EMP_ID = Convert.ToInt32(rad_Employee.SelectedValue); dt_Details = BLL.get_Employee(_obj_smhr_employee); if (dt_Details != null) { if (dt_Details.Rows.Count > 0) { rdp_DOB.SelectedDate = Convert.ToDateTime(dt_Details.Rows[0]["DOB"]); rdp_DOJ.SelectedDate = Convert.ToDateTime(dt_Details.Rows[0]["DOJ"]); DateTime dt = Convert.ToDateTime(rdp_DOB.SelectedDate.Value); DateTime BirthDate = Convert.ToDateTime(rdp_DOB.SelectedDate.Value); dt = dt.AddYears(15); if (dt < DateTime.Now) { int years = DateTime.Now.Year - BirthDate.Year; if (DateTime.Now.Month < BirthDate.Month || (DateTime.Now.Month == BirthDate.Month && DateTime.Now.Day < BirthDate.Day)) { years--; } rad_Age.Text = Convert.ToString(years + " yrs"); } } } } else { rdp_DOB.Clear(); rdp_DOJ.Clear(); rad_Age.Text = string.Empty; // pnl_CalculatePension.Visible = false; txt_Category.Text = string.Empty; txt_lifeBenefit.Text = string.Empty; txt_Pension.Text = string.Empty; txt_Total.Text = string.Empty; } } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frmEmployeePensionComputations", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); } }
private void getDetails() { _obj_smhr_employee = new SMHR_EMPLOYEE(); _obj_smhr_employee.EMP_ID = Convert.ToInt32(Session["EMP_ID"]); _obj_smhr_employee.Mode = 1; DataTable dt = BLL.get_EmpESS(_obj_smhr_employee); if (dt.Rows.Count != 0) { lbl_Welcome.Text = "Welcome, " + Convert.ToString(dt.Rows[0]["APPLICANT_TITLE"]) + ' ' + Convert.ToString(dt.Rows[0]["APPLICANT_FIRSTNAME"]) + ' ' + Convert.ToString(dt.Rows[0]["APPLICANT_MIDDLENAME"]) + ' ' + Convert.ToString(dt.Rows[0]["APPLICANT_LASTNAME"]); } }
private void LoadReportingEmployees_Edit() { try { //if (Convert.ToString(rcmb_DisactRecEmpID.SelectedItem.Value) != "-1") if (rcmb_DisactRecEmpID.SelectedIndex > 0) { SMHR_EMPDISCIPLINARYACTION _obj_Smhr_EmpDisciplinaryAction = new SMHR_EMPDISCIPLINARYACTION(); _obj_Smhr_EmpDisciplinaryAction.OPERATION = operation.FILLEMP_Edit; _obj_Smhr_EmpDisciplinaryAction.ORGANISATION_ID = Convert.ToInt32(Session["ORG_ID"]); DataTable dt = BLL.get_EmpDiscNotes(_obj_Smhr_EmpDisciplinaryAction); dt.DefaultView.RowFilter = " EMP_ID <> " + Convert.ToString(rcmb_DisactRecEmpID.SelectedItem.Value); dt = dt.DefaultView.ToTable(); rcmb_DisactRecManagerID.Items.Clear(); rcmb_DisactRecManagerID.DataSource = dt; rcmb_DisactRecManagerID.DataTextField = "EMPNAME"; rcmb_DisactRecManagerID.DataValueField = "EMP_ID"; rcmb_DisactRecManagerID.DataBind(); SMHR_EMPLOYEE _obj_Smhr_Employee = new SMHR_EMPLOYEE(); _obj_Smhr_Employee.OPERATION = operation.Select; _obj_Smhr_Employee.EMP_ID = Convert.ToInt32(rcmb_DisactRecEmpID.SelectedItem.Value); _obj_Smhr_Employee.ORGANISATION_ID = Convert.ToInt32(Session["ORG_ID"]);//BASED ON THE ORGANISATION DISPLAYING EMPLOYEE dt = new DataTable(); dt = BLL.get_Employee(_obj_Smhr_Employee); if (dt.Rows.Count > 0) { rcmb_DisactRecManagerID.SelectedIndex = rcmb_DisactRecManagerID.FindItemIndexByValue(Convert.ToString(dt.Rows[0]["EMP_REPORTINGEMPLOYEE"])); if (dt.Rows[0]["EMP_DOJ"] != DBNull.Value) { rdtp_DisactRecDOJ.SelectedDate = Convert.ToDateTime(Convert.ToString(dt.Rows[0]["EMP_DOJ"])); } // need to check with archan madam and sridevi madam } rcmb_DisactRecManagerID.Enabled = true; } else { rcmb_DisactRecManagerID.Items.Clear(); rdtp_DisactRecDOJ.SelectedDate = null; } rcmb_DisactRecManagerID.Items.Insert(0, new Telerik.Web.UI.RadComboBoxItem("Select", "-1")); } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_DisactRecording", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); } }
private void LoadEmployeeDetails() { try { SMHR_EMPLOYEE objEmpDtls = new SMHR_EMPLOYEE(); objEmpDtls.EMP_ID = Convert.ToInt32(rcmb_Employee.SelectedValue); objEmpDtls.ORGANISATION_ID = Convert.ToInt32(Session["ORG_ID"]); objEmpDtls.MODE = 1; DataTable dtEmpDtls = BLL.get_EmployeeDtls(objEmpDtls); if (dtEmpDtls.Rows.Count > 0) { if (Convert.ToBoolean(dtEmpDtls.Rows[0]["IsPartialPayment"]))//Is partial payment { trPayItem.Visible = true; rcmb_SettlementType.Enabled = true; hdnIsPartialPaymnt.Value = Convert.ToString(dtEmpDtls.Rows[0]["IsPartialPayment"]); rdtpSettlementDate.MinDate = Convert.ToDateTime(dtEmpDtls.Rows[0]["EMP_RELDATE"]); rdtpSettlementDate.SelectedDate = DateTime.Today; rtxt_Amount.Text = Convert.ToString(Convert.ToDouble(rtxt_TotPensionAmt.Value) - Convert.ToDouble(rtxt_AmtDisbursed.Value)); rtxt_Amount.Enabled = true; } else { if (Convert.ToString(dtEmpDtls.Rows[0]["RelievingReason"]) == "Death") { rcmb_WithdrawlType.SelectedIndex = rcmb_WithdrawlType.FindItemIndexByValue(Convert.ToString("Family")); rcmb_WithdrawlType.Enabled = false; rcmb_WithdrawlType_SelectedIndexChanged(null, null); } rcmb_SettlementType.SelectedIndex = rcmb_SettlementType.FindItemIndexByValue(Convert.ToString(dtEmpDtls.Rows[0]["FullSettlementID"])); rcmb_SettlementType.Enabled = false; trPayItem.Visible = false; rtxt_Amount.Text = Convert.ToString(Convert.ToDouble(rtxt_TotPensionAmt.Value) - Convert.ToDouble(rtxt_AmtDisbursed.Value)); rtxt_Amount.Enabled = false; rdtpSettlementDate.MinDate = Convert.ToDateTime(dtEmpDtls.Rows[0]["EMP_RELDATE"]); rdtpSettlementDate.SelectedDate = DateTime.Today; hdnIsPartialPaymnt.Value = Convert.ToString(dtEmpDtls.Rows[0]["IsPartialPayment"]); } } else { } } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_PensionFFS", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); } }
/// <summary> /// Get Employee /// </summary> /// <param name="_obj_smhr_employee"></param> /// <returns></returns> public static DataTable getEmployee1(SMHR_EMPLOYEE _obj_smhr_employee) { if (_obj_smhr_employee.OPERATION == operation.Scale) { return(ExecuteQuery("EXEC USP_SMHR_EMPLOYEE_New @Operation='Scale',@EMP_ID='" + _obj_smhr_employee.EMP_ID + "',@EMP_GRADE='" + _obj_smhr_employee.EMP_GRADE + "',@ORGANISATION_ID='" + _obj_smhr_employee.ORGANISATION_ID + "'")); } else if (_obj_smhr_employee.OPERATION == operation.Employee) { return(ExecuteQuery("EXEC USP_SMHR_EMPLOYEE_New @Operation='Employee',@EMP_GRADE='" + _obj_smhr_employee.EMP_GRADE + "',@EMP_BUSINESSUNIT_ID='" + _obj_smhr_employee.EMP_BUSINESSUNIT_ID + "'")); } else { return(new DataTable()); } }
private void Loademployee() { try { for (int index = 0; index <= rbt_SalaryList.Items.Count - 1; index++) { if (rbt_SalaryList.Items[index].Selected && rdtp_FromDate.SelectedDate != null && rdtp_ToDate.SelectedDate != null) { btn_Paytran.Visible = true; _obj_smhr_employee = new SMHR_EMPLOYEE(); _obj_smhr_employee.OPERATION = operation.Check1; _obj_smhr_employee.EMP_BUSINESSUNIT_ID = Convert.ToInt32(ddl_BusinessUnit.SelectedValue); _obj_smhr_employee.EMP_SALALRYSTRUCT_ID = Convert.ToInt32(rbt_SalaryList.SelectedValue); _obj_smhr_employee.ORGANISATION_ID = Convert.ToInt32(Session["ORG_ID"]); _obj_smhr_employee.EMP_DOJ = Convert.ToDateTime(rdtp_FromDate.SelectedDate); _obj_smhr_employee.EMP_RELDATE = Convert.ToDateTime(rdtp_ToDate.SelectedDate); _obj_smhr_employee.EMPSALDTLS_PRDDTL_ID = Convert.ToInt32(ddl_PeriodElements.SelectedValue); DataTable dt = BLL.get_PayBusinessUnit(_obj_smhr_employee); if (dt.Rows.Count != 0) { ddl_Employees.Items.Clear(); ddl_Employees.DataSource = dt; ddl_Employees.DataTextField = "EMPLOYEENAME"; ddl_Employees.DataValueField = "EMP_ID"; ddl_Employees.DataBind(); ddl_Employees.Items.Insert(0, new RadComboBoxItem("ALL")); } else { ddl_Employees.Items.Clear(); // ddl_Employees.Items.Insert(0, new RadComboBoxItem("Select")); BLL.ShowMessage(this, "No Employees To Process"); btn_Paytran.Visible = false; return; } } else { } } } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_QuickPay", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); } }
protected void btn_Hire_Click(object sender, EventArgs e) { try { SMHR_ORGANISATION _obj_Smhr_Organisation = new SMHR_ORGANISATION(); _obj_Smhr_Organisation.MODE = 8; _obj_Smhr_Organisation.ORGANISATION_ID = Convert.ToInt32(Session["ORG_ID"]); DataTable dt = BLL.get_Organisation(_obj_Smhr_Organisation); SMHR_EMPLOYEE _obj_smhr_employee = new SMHR_EMPLOYEE(); _obj_smhr_employee = new SMHR_EMPLOYEE(); _obj_smhr_employee.OPERATION = operation.EmployeeCount; _obj_smhr_employee.ORGANISATION_ID = Convert.ToInt32(Session["ORG_ID"]); DataTable dtDetails = BLL.get_Employee(_obj_smhr_employee); string Val = BLL.PasswordDecrypt(Convert.ToString(dt.Rows[0]["ORGANISATION_EMPLOYEES"])); string strVal = Convert.ToString(dtDetails.Rows[0]["EMPCOUNT"]); if (dtDetails.Rows.Count != 0) { if (Val != strVal) { if (Convert.ToInt32(Val) > Convert.ToInt32(strVal)) { RehireProcess(); } else { BLL.ShowMessage(this, "You have only limited no of users License. You cannot create more employees"); return; } } else { BLL.ShowMessage(this, "You have only limited no of users License. You cannot create more employees"); return; } } else { RehireProcess(); } } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_EmployeeRehire", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); return; } }
//private void loadDepartment() //{ // SMHR_DEPARTMENT _obj_smhr_department = new SMHR_DEPARTMENT(); // _obj_smhr_department.BUID = Convert.ToInt32(rcmb_BusinessUnit.SelectedItem.Value); // _obj_smhr_department.MODE = 7; // DataTable dt_dept = BLL.get_Department(_obj_smhr_department); // ddl_Department.DataSource = dt_dept; // ddl_Department.DataValueField = "DEPARTMENT_ID"; // ddl_Department.DataTextField = "DEPARTMENT_NAME"; // ddl_Department.DataBind(); // ddl_Department.Items.Insert(0, new RadComboBoxItem("Select")); //} //protected void ddl_Department_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e) //{ // if (Convert.ToString(Session["SELFSERVICE"]) == "") // { // LoadEmployees(); // rcmb_Employee.Enabled = true; // } // else // { // LoadEmployees(); // rcmb_Employee.Enabled = true; // rcmb_Employee.SelectedIndex = rcmb_Employee.FindItemIndexByValue(Convert.ToString(Session["EMP_ID"])); // } //} private void LoadEmployees() { try { if (Convert.ToString(Session["SELFSERVICE"]) == "ADMIN") { //SMHR_LOGININFO obj_smhr_logininfo = new SMHR_LOGININFO(); //obj_smhr_logininfo.OPERATION = operation.Check; //string str_BusinessUnit_ID = Convert.ToString(rcmb_BusinessUnit.SelectedValue).ToUpper(); //obj_smhr_logininfo.OPERATION = operation.Check; //obj_smhr_logininfo.BUID = Convert.ToInt32(str_BusinessUnit_ID); //DataTable dt_getEMP = BLL.get_Sup_BusinessUnit(obj_smhr_logininfo); obj_smhr_Employee = new SMHR_EMPLOYEE(); obj_smhr_Employee.OPERATION = operation.getdeptwise; obj_smhr_Employee.EMP_BUSINESSUNIT_ID = Convert.ToInt32(rcmb_BusinessUnit.SelectedValue); obj_smhr_Employee.EMP_DEPARTMENT_ID = 0; DataTable dt_getEMP = BLL.get_Employee(obj_smhr_Employee); rcmb_Employee.Items.Clear(); rcmb_Employee.DataSource = dt_getEMP; rcmb_Employee.DataTextField = "EMP_NAME"; rcmb_Employee.DataValueField = "EMP_ID"; rcmb_Employee.DataBind(); rcmb_Employee.Items.Insert(0, new Telerik.Web.UI.RadComboBoxItem("Select")); } else { SMHR_EMP_PAYITEMS _obj_smhr_emp_payitems = new SMHR_EMP_PAYITEMS(); _obj_smhr_emp_payitems.EMP_ID = Convert.ToInt32(Session["EMP_ID"]); _obj_smhr_emp_payitems.ORGANISATION_ID = Convert.ToInt32(Session["ORG_ID"]); _obj_smhr_emp_payitems.OPERATION = operation.Self; DataTable dt_EMP = BLL.get_EmpDetails(_obj_smhr_emp_payitems); rcmb_Employee.DataSource = dt_EMP; rcmb_Employee.DataTextField = "Empname"; rcmb_Employee.DataValueField = "EMP_ID"; rcmb_Employee.DataBind(); rcmb_Employee.Items.Insert(0, new Telerik.Web.UI.RadComboBoxItem("Select", "-1")); } } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "SalarySlip", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); } }
private void LoadData() { try { _obj_smhr_employee = new SMHR_EMPLOYEE(); _obj_smhr_employee.OPERATION = operation.Select1; _obj_smhr_employee.ORGANISATION_ID = Convert.ToInt32(Session["ORG_ID"]); _obj_smhr_employee.EMP_LOGIN_ID = Convert.ToInt32(Session["USER_ID"]); DataTable dt_Details = BLL.get_Employee(_obj_smhr_employee); RG_Employee.DataSource = dt_Details; } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_EmpFamDetails_Medical", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); } }
private void LoadReportEmployees() { try { if (Convert.ToString(rcmb_NotesRecEmpID.SelectedItem.Value) != "-1") { SMHR_EMPNOTES _obj_Smhr_EmpNotes = new SMHR_EMPNOTES(); _obj_Smhr_EmpNotes.OPERATION = operation.Empty; _obj_Smhr_EmpNotes.ORGANISATION_ID = Convert.ToInt32(Session["ORG_ID"]); DataTable dt = BLL.get_EmpNotes(_obj_Smhr_EmpNotes); dt.DefaultView.RowFilter = " EMP_ID <> " + Convert.ToString(rcmb_NotesRecEmpID.SelectedItem.Value); dt = dt.DefaultView.ToTable(); rcmb_NotesRecManagerID.Items.Clear(); rcmb_NotesRecManagerID.DataSource = dt; rcmb_NotesRecManagerID.DataTextField = "EMPNAME"; rcmb_NotesRecManagerID.DataValueField = "EMP_ID"; rcmb_NotesRecManagerID.DataBind(); SMHR_EMPLOYEE _obj_Smhr_Employee = new SMHR_EMPLOYEE(); _obj_Smhr_Employee.OPERATION = operation.Select; _obj_Smhr_Employee.EMP_ID = Convert.ToInt32(rcmb_NotesRecEmpID.SelectedItem.Value); dt = new DataTable(); _obj_Smhr_Employee.ORGANISATION_ID = Convert.ToInt32(Session["ORG_ID"]); dt = BLL.get_Employee(_obj_Smhr_Employee); rcmb_NotesRecManagerID.SelectedIndex = rcmb_NotesRecManagerID.FindItemIndexByValue(Convert.ToString(dt.Rows[0]["EMP_REPORTINGEMPLOYEE"])); if (dt.Rows[0]["EMP_DOJ"] != DBNull.Value) { rdtp_NotesRecDOJ.SelectedDate = Convert.ToDateTime(Convert.ToString(dt.Rows[0]["EMP_DOJ"])); } rcmb_NotesRecManagerID.Enabled = false; } else { rcmb_NotesRecManagerID.Items.Clear(); rdtp_NotesRecDOJ.SelectedDate = null; } rcmb_NotesRecManagerID.Items.Insert(0, new Telerik.Web.UI.RadComboBoxItem("Select", "-1")); } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_employeeNotes", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); } }
protected void LoadEmpFamilyDetails() { if (rcmb_Employee.SelectedIndex > 0) { SMHR_EMPLOYEE _obj_SMHR_EMPLOYEE = new SMHR_EMPLOYEE(); _obj_SMHR_EMPLOYEE.OPERATION = operation.CheckEmp; _obj_SMHR_EMPLOYEE.EMP_ID = Convert.ToInt32(rcmb_Employee.SelectedValue); DataTable dtEmpFmlys = BLL.get_EmployeeFamily(_obj_SMHR_EMPLOYEE); rcbDependentName.DataSource = dtEmpFmlys; rcbDependentName.DataTextField = "EMPFMDTL_NAME"; rcbDependentName.DataValueField = "EMPFMDTL_ID"; rcbDependentName.DataBind(); rcbDependentName.Items.Insert(0, new Telerik.Web.UI.RadComboBoxItem("Select")); } }