private void btnregdealers_Click(object sender, EventArgs e) { try { cdnr b2b = new cdnr(master, tabControl); master.AddNewTab(b2b); } catch { } }
private void btnregdealers_Click(object sender, EventArgs e) { try { userrights = conn.getdataset("Select * from UserRights where isactive=1 and uid='" + Master.userid + "'"); if (userrights.Rows.Count > 0) { if (userrights.Rows[41]["a"].ToString() == "True") { cdnr b2b = new cdnr(master, tabControl); master.AddNewTab(b2b); } else { MessageBox.Show("You Don't Have Permission to View"); return; } } } catch { } }