public Frm_Buy()
 {
     InitializeComponent();
     if (frm == null)
     {
         frm = this;
     }
 }
        private void tileItem5_ItemClick(object sender, DevExpress.XtraEditors.TileItemEventArgs e)
        {
            bool check = checkUser("Buy", "User_Buy");

            if (check == true)
            {
                Frm_Buy frm = new Frm_Buy();
                frm.ShowDialog();
            }
        }
        private void barButtonItem11_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            bool check = checkUser("Buy", "User_Buy");

            if (check == true)
            {
                Frm_Buy frm = new Frm_Buy();
                frm.ShowDialog();
            }
        }
 static void frm_FormClosed(object sender, FormClosedEventArgs e)
 {
     frm = null;
 }