예제 #1
0
        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);
                }
            }
        }
예제 #2
0
 //Normal Constructor lkvndflkhndfl
 public frm_Registration()
 {
     InitializeComponent();
             wrap = new Wrapper();
 }
예제 #3
0
        private void FillCountry()
        {
            wrap = new Wrapper();
            DataTable dt_Country = wrap.GetComboData("GETDATA_FOR_COUNTRY");
            //DataTable dt_State = wrap.GetComboData("GETDATA_FOR_STATE");

            cmb_Country.DataSource = dt_Country;
            cmb_Country.DisplayMember = "country_name";
            cmb_Country.ValueMember = "country_id";
        }
예제 #4
0
        private void FillState()
        {
            wrap = new Wrapper();
            //DataTable dt_country = wrap.GetComboData("GETDATA_FOR_COUNTRY");
            DataTable dt_State = wrap.GetComboData("GETDATA_FOR_STATE");

            cmb_State.DataSource = dt_State;
            cmb_State.DisplayMember = "state_name";
            cmb_State.ValueMember = "state_id";

            wrap.CloseConnection();
            wrap = null;
        }
예제 #5
0
        public void frm_ViewMember_Load(object sender, EventArgs e)
        {
            wrap = new Wrapper();
            frm_Registration.setImage(picb_Logo, 193, 117);
            if (registrationid == null || registrationid == string.Empty || registrationid == "")
            { }
            else
            {
                ReadOnlyAllControl();
                //cphone = frm_Search.cphone.Replace("(", "").Replace(")", "").Replace("-", "").Trim();
                //bphone = frm_Search.bphone.Replace("(", "").Replace(")", "").Replace("-", "").Trim();
                //bphone = (bphone == string.Empty ? null : bphone);
                //cphone = (cphone == string.Empty ? null : cphone);
                bphone =  Global.BusinessPhone;
                cphone = Global.CellPhone;
                SqlDataReader dr = wrap.GetFilteredData("[PROC_GETDATA_MEMBER_REGISTRATION]",bphone,cphone,registrationid);

                if (dr.Read())
                {
                    lblRegistrationID.Text = dr["registration_id"].ToString();

                    lblReg_id.Text = dr["reg_id"].ToString();
                    lblReg_id.Visible = false;
                    txt_FristName.Text = dr["first_name"].ToString();

                    txt_LastName.Text = dr["last_name"].ToString();

                    txt_BusiName.Text = dr["business_name"].ToString();

                    cmb_BusiType.Text = dr["business_typename"].ToString();
                    txt_Address.Text = dr["business_address"].ToString();
                    txt_Address.Text = txt_Address.Text.ToUpper();
                    txt_City.Text = dr["city"].ToString();
                    txt_City.Text = txt_City.Text.ToUpper();
                    cmb_Country.Text = dr["country_name"].ToString();
                    cmb_County.Text = dr["county_name"].ToString();
                    cmb_State.Text = dr["state_name"].ToString();
                    txt_Zip.Text = dr["zip"].ToString();
                    txt_BusiPhone.Text = dr["business_phone"].ToString();
                    txt_CellPhone.Text = dr["cell_phone"].ToString();
                    txt_Email.Text = dr["email"].ToString();
                    txt_Website.Text = dr["website"].ToString();
                }
            }
        }
예제 #6
0
        public void FillCounty()
        {
            wrap = new Wrapper();
            DataTable dt_county = wrap.GetComboData("GETDATA_FOR_COUNTY");

            cmb_County.DataSource = dt_county;
            cmb_County.DisplayMember = "county_name";
            cmb_County.ValueMember = "c_id";

            wrap.CloseConnection();
            wrap = null;
        }
예제 #7
0
        public void FillBusinessType()
        {
            wrap = new Wrapper();
            //Fill the Business Type data:
            DataTable dt_businesstype = wrap.GetComboData("GETDATA_FOR_BUSINESSTYPE");

            cmb_BusiType.DataSource = dt_businesstype;
            cmb_BusiType.DisplayMember = "business_typename";
            cmb_BusiType.ValueMember = "business_id";

            wrap.CloseConnection();
            wrap = null;
        }
예제 #8
0
 public Users()
     : base()
 {
     wrap = (Wrapper)Global.CreateInstance(typeof(Users));
 }
예제 #9
0
 public Users()
     : base()
 {
     wrap = (Wrapper)Global.CreateInstance(typeof(Users));
 }