//protected void GrdViewItems_SelectedIndexChanged(object sender, EventArgs e) //{ //} //protected void GrdViewPurchase_RowDeleting(object sender, GridViewDeleteEventArgs e) //{ //} protected void lnkBtnAdd_Click(object sender, EventArgs e) { try { ModalPopupLock.Show(); DataSet ds = new DataSet(); string connection = string.Empty; string userid = string.Empty; if (Request.Cookies["Company"] != null) { connection = Request.Cookies["Company"].Value; } if (Request.QueryString["ID"] != null) { userid = Request.QueryString["ID"].ToString(); } BusinessLogic objBus = new BusinessLogic(); ds = objBus.GetMasterRoles(System.Configuration.ConfigurationManager.ConnectionStrings[connection].ConnectionString); GrdViewItems.DataSource = ds; GrdViewItems.DataBind(); } catch (Exception ex) { TroyLiteExceptionManager.HandleException(ex); } }
protected void cmdCancel_Click(object sender, EventArgs e) { try { GrdViewItems.DataSource = null; GrdViewItems.DataBind(); ModalPopupLock.Hide(); BusinessLogic objChk = new BusinessLogic(); string dbfileName = sDataSource.Remove(0, sDataSource.LastIndexOf(@"App_Data\") + 9); dbfileName = dbfileName.Remove(dbfileName.LastIndexOf(";Persist Security Info")); if (objChk.CheckForOffline(Server.MapPath("Offline\\" + dbfileName + ".offline"))) { lnkBtnAdd.Visible = false; pnlSearch.Visible = false; } } catch (Exception ex) { TroyLiteExceptionManager.HandleException(ex); } }