private void btn_Login_Click(object sender, EventArgs e)
        {
            if (CheckValidation())
            {
                try
                {
                    wrap = new Wrapper();


                    if (cmb_EventId.Text != "Select Any" && cmb_EventId.Text != string.Empty && cmb_EventId.Text != null)
                    {
                        res = new UsersBAL().ExistUser(new string[] { txt_UserName.Text.Trim(), Global.EncryptedPassword(txt_Password.Text.Trim()), "Xhibitor", cmb_EventId.Text });
                        if (res)
                        {
                            int id = GetUserId(txt_UserName.Text.Trim());
                            Global.UserId   = id.ToString();
                            Global.UserName = txt_UserName.Text.Trim();
                            this.Close();
                            frm_Search frm = new frm_Search();
                            frm.MdiParent = this.MdiParent;
                            frm.Show();
                        }
                        else
                        {
                            FormCustomization_Sample.MessageBox.Show("Please Check UserName and Password !!!", Global.MsgInfo, MessageBoxStyle.Errorr);
                            txt_UserName.Focus();
                            Clear();
                        }
                    }
                    else
                    {
                        res = new UsersBAL().ExistUser(new string[] { txt_UserName.Text.Trim(), Global.EncryptedPassword(txt_Password.Text.Trim()), "Authorised", null });
                        if (res)
                        {
                            int id = GetUserId(txt_UserName.Text.Trim());
                            Global.UserId   = id.ToString();
                            Global.UserName = txt_UserName.Text.Trim();
                            this.Close();
                            frm_UserSetup frm = new frm_UserSetup();
                            frm.MdiParent = this.MdiParent;
                            frm.Show();
                        }
                        else
                        {
                            FormCustomization_Sample.MessageBox.Show("Please Check UserName and Password !!!", Global.MsgInfo, MessageBoxStyle.Errorr);
                            txt_UserName.Focus();
                            Clear();
                        }
                    }
                }
                catch (Exception ex)
                {
                    FormCustomization_Sample.MessageBox.Show(ex.Message, Global.MsgInfo, MessageBoxStyle.Errorr);
                }
            }
        }
        private void btn_Login_Click(object sender, EventArgs e)
        {
            if (CheckValidation())
            {
                try
                {
                    wrap = new Wrapper();

                    if (cmb_EventId.Text != "Select Any" && cmb_EventId.Text != string.Empty && cmb_EventId.Text != null)
                    {
                        res = new UsersBAL().ExistUser(new string[] { txt_UserName.Text.Trim(), Global.EncryptedPassword(txt_Password.Text.Trim()), "Xhibitor", cmb_EventId.Text });
                        if (res)
                        {
                            int id = GetUserId(txt_UserName.Text.Trim());
                            Global.UserId = id.ToString();
                            Global.UserName = txt_UserName.Text.Trim();
                            this.Close();
                            frm_Search frm = new frm_Search();
                            frm.MdiParent = this.MdiParent;
                            frm.Show();
                        }
                        else
                        {
                            FormCustomization_Sample.MessageBox.Show("Please Check UserName and Password !!!", Global.MsgInfo, MessageBoxStyle.Errorr);
                            txt_UserName.Focus();
                            Clear();
                        }
                    }
                    else
                    {
                        res = new UsersBAL().ExistUser(new string[] { txt_UserName.Text.Trim(), Global.EncryptedPassword(txt_Password.Text.Trim()), "Authorised", null });
                        if (res)
                        {
                            int id = GetUserId(txt_UserName.Text.Trim());
                            Global.UserId = id.ToString();
                            Global.UserName = txt_UserName.Text.Trim();
                            this.Close();
                            frm_UserSetup frm = new frm_UserSetup();
                            frm.MdiParent = this.MdiParent;
                            frm.Show();
                        }
                        else
                        {
                            FormCustomization_Sample.MessageBox.Show("Please Check UserName and Password !!!", Global.MsgInfo, MessageBoxStyle.Errorr);
                            txt_UserName.Focus();
                            Clear();
                        }
                    }
                }
                catch (Exception ex)
                {
                    FormCustomization_Sample.MessageBox.Show(ex.Message, Global.MsgInfo, MessageBoxStyle.Errorr);
                }
            }
        }