예제 #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                IsHorizontal = true;
                BIZ.User blluser = new BIZ.User();
                blluser.Name             = txtName.Text;
                blluser.LoftName         = txtLoftName.Text;
                blluser.Address          = txtAddress.Text;
                blluser.ContactNumber    = txtContactNumber.Text;
                blluser.Resolution       = int.Parse(txtresolution.Text);
                blluser.ResolutionY      = int.Parse(txtResolutionY.Text);
                blluser.Logo             = Common.Common.GetImage(this.pbLogo);
                blluser.BackgroundImages = txtbackground.Text;
                this.BackgroundImages    = txtbackground.Text;
                PedigreeSetup            = blluser.PedigreeSetup(UserID);
                this.IsFourthGen         = this.checkBox1.Checked;
                this.IsShowOwnerDetails  = this.checkBox2.Checked;

                if (radioButton2.Checked)
                {
                    IsHorizontal = false;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error");
            }
            this.Close();
        }
예제 #2
0
        private void Login()
        {
            try
            {
                GetControlValue();
                UserID = 0;
                if (UserName.ToUpper() == "ADMINISTRATOR" && Password == "04212016mavc")
                {
                    UserID   = 9000;
                    ClubID   = 9000;
                    IsAdmin  = true;
                    ClubName = "Administrator";
                }
                else
                {
                    DataTable dtResult;
                    user = new BIZ.User();
                    PopulateBussinessLayer();
                    dtResult = user.Login().Tables[0];
                    if (dtResult.Rows.Count > 0)
                    {
                        UserID  = Convert.ToInt64(dtResult.Rows[0]["UserID"]);
                        Version = Convert.ToString(dtResult.Rows[0]["Version"]);
                        Istrial = Convert.ToBoolean(dtResult.Rows[0]["IsTrial"]);
                    }
                    else
                    {
                        MessageBox.Show("Invalid Username or Password");
                        return;
                    }

                    if (Version == "Expired")
                    {
                        MessageBox.Show("Period Expired");
                        return;
                    }
                }

                if (UserID > 0)
                {
                    PigeonDetails pd = new PigeonDetails();
                    this.Hide();
                    pd.UserID       = UserID;
                    pd.Istrial      = Istrial;
                    pd.TrialVersion = this.Version;
                    pd.AppsVersion  = VERSION;
                    pd.ShowDialog();
                    this.Close();
                }
                ;
            }
            catch (Exception ex)
            {
                MessageBox.Show(Common.Common.CustomError(ex.Message), "Error");
            }
        }