protected void loadgrid() { try { _obj_kra = new pms_kraform(); _obj_kra.KRA_MODE = 1; _obj_kra.KRA_ORG_ID = Convert.ToInt32(Session["ORG_ID"]); _obj_kra.LOGIN_ID = Convert.ToInt32(Session["USER_ID"]); DataTable dt = Pms_Bll.get_kra(_obj_kra); if (dt.Rows.Count != 0) { RG_kraform.DataSource = dt; RG_kraform.DataBind(); } else { DataTable dt1 = new DataTable(); RG_kraform.DataSource = dt1; RG_kraform.DataBind(); } } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_Mgr_Kra", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); } }
private void LoadGrid() { try { _obj_kra = new pms_kraform(); _obj_kra.KRA_MODE = 9; _obj_kra.KRA_ORG_ID = Convert.ToInt32(Session["ORG_ID"]); _obj_kra.LOGIN_ID = Convert.ToInt32(Session["USER_ID"]); DataTable dt = Pms_Bll.get_kra(_obj_kra); RG_kraform.DataSource = dt; RG_kraform.DataBind(); if (RG_kraform.Items.Count > 0) { if (Convert.ToInt32(Session["WRITEFACILITY"]) == 1) { tr_btns.Visible = true; } else { tr_btns.Visible = false; } } else { tr_btns.Visible = false; } } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_KRAApprove", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); } }