Example #1
0
 protected void rcb_Employee_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e)
 {
     try
     {
         if (rcb_Employee.SelectedIndex != 0)
         {
             LoadGrid();
             RG_Employee.DataBind();
             RG_Employee.Visible = true;
             btn_Cancel.Visible  = true;
             btn_Save.Visible    = true;
         }
         else
         {
             RG_Employee.Visible = false;
             btn_Cancel.Visible  = false;
             btn_Save.Visible    = false;
         }
         if (Convert.ToInt32(Session["WRITEFACILITY"]) == 2)
         {
             btn_Save.Visible = false;
         }
     }
     catch (Exception ex)
     {
         SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_Income_Trans", ex.StackTrace, DateTime.Now);
         Response.Redirect("~/Frm_ErrorPage.aspx");
         return;
     }
 }
 protected void rcb_Employee_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e)
 {
     try
     {
         if ((rcb_Employee.SelectedIndex != 0) && (rcmb_period.SelectedIndex > 0))
         {
             LoadGrid();
             RG_Employee.DataBind();
             RG_Employee.Visible = true;
             btn_Cancel.Visible  = true;
             btn_Save.Visible    = true;
         }
         else
         {
             if (rcmb_period.SelectedIndex <= 0)
             {
                 rcb_Employee.ClearSelection();
                 BLL.ShowMessage(this, "Select Financial Period");
             }
             RG_Employee.Visible = false;
             btn_Cancel.Visible  = false;
             btn_Save.Visible    = false;
         }
         if (Convert.ToInt32(Session["WRITEFACILITY"]) == 2)
         {
             btn_Save.Visible = false;
         }
     }
     catch (Exception ex)
     {
         SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_TDSExempt", ex.StackTrace, DateTime.Now);
         Response.Redirect("~/Frm_ErrorPage.aspx");
     }
 }