protected void rcmb_Period_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e) { try { if (rcmb_Payitem.SelectedIndex != 0 && rcmb_Payitem.SelectedItem.Text != "Select") { _obj_smhr_emp_payitems = new SMHR_PAYITEMS_EMP(); _obj_smhr_emp_payitems.SMHR_EMP_PAYITEMS_PAYITEMID = Convert.ToInt32(rcmb_Payitem.SelectedValue); _obj_smhr_emp_payitems.SMHR_EMP_PAYITEMS_PERIODID = Convert.ToInt32(rcmb_Period.SelectedValue); _obj_smhr_emp_payitems.OPERATION = operation.Check1; DataTable dt = BLL.get_EmpDetails_1(_obj_smhr_emp_payitems); if (dt.Rows.Count != 0) { Rg_Employeesal.DataSource = dt; Rg_Employeesal.DataBind(); } else { //LoadEmptyData(); } int i; for (i = 0; i <= Rg_Employeesal.Items.Count - 1; i++) { CheckBox chkChoose = new CheckBox(); TextBox txtgetVal = new TextBox(); chkChoose = Rg_Employeesal.Items[i].FindControl("chk_Choose") as CheckBox; txtgetVal = Rg_Employeesal.Items[i].FindControl("txtNumber") as TextBox; if (Convert.ToString(txtgetVal.Text) != "") { chkChoose.Checked = true; } else { chkChoose.Checked = false; } } } else { } } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_emppayelements", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); } }
private void LoadEmptyData() { try { _obj_smhr_salaryStruct = new SMHR_SALARYSTRUCT(); _obj_smhr_salaryStruct.OPERATION = operation.EMPTY1; DataTable dt_Details = BLL.get_EmptyValues(_obj_smhr_salaryStruct); Rg_Employeesal.DataSource = dt_Details; Rg_Employeesal.DataBind(); } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_emppayelements", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); } }
protected void rcb_BussinessUnit_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e) { try { Rg_Employeesal.Visible = true; if (rcb_BussinessUnit.SelectedIndex != 0) { _obj_smhr_salaryStruct = new SMHR_SALARYSTRUCT(); _obj_smhr_salaryStruct.OPERATION = operation.EMPTY1; DataTable dt_Details = BLL.get_EmptyValues(_obj_smhr_salaryStruct); if (dt_Details.Rows.Count != 0) { Rg_Employeesal.DataSource = dt_Details; Rg_Employeesal.DataBind(); } else { LoadEmptyData(); } } else { BLL.ShowMessage(this, "Business Unit is not available"); return; } rcmb_Payitem.Items.Clear(); _obj_smhr_salaryStruct = new SMHR_SALARYSTRUCT(); _obj_smhr_salaryStruct.OPERATION = operation.Empty; DataTable dt = BLL.get_EmptyValues(_obj_smhr_salaryStruct); rcmb_Payitem.DataSource = dt; rcmb_Payitem.DataValueField = "PAYITEM_ID"; rcmb_Payitem.DataTextField = "PAYITEM_PAYITEMNAME"; rcmb_Payitem.DataBind(); rcmb_Payitem.Items.Insert(0, new RadComboBoxItem("Select")); rcmb_Period.Items.Clear(); rcmb_Period.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("'", "''"), "frm_emppayelements", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); } }