private void ShowLCOrderGridByPrincipal() { string ocode = ((SessionUser)Session["SessionUser"]).OCode; int PrincipalId = Convert.ToInt32(ddlS_Principal.SelectedValue); var result = masterBLL.GetLCOrderGridByPrincipal(ocode, PrincipalId); if (result.Count > 0) { grdorder.DataSource = result.ToList(); grdorder.DataBind(); } else { ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), "text", "func('No Data Found With This Style')", true); } }