Esempio n. 1
0
        private void UserButton_Click(object sender, EventArgs e)
        {
            CCurrentUser.User_name = ((UserButton)sender).TouchButton.Text;
            AuthenticationForm objAuthentication = AuthenticationForm.CreateInstance(((UserButton)sender).rmsUserName.Text);
            DialogResult       drResult          = objAuthentication.ShowDialog();

            if (drResult == DialogResult.OK)
            {
                RMSAdminMdiForm objParent = new RMSAdminMdiForm();  //Previous
                objParent.Show();
            }
        }
Esempio n. 2
0
        private void ProcessLogin()
        {
            try
            {
                CCommonConstants objCommonConstant = ConfigManager.GetConfig <CCommonConstants>();

                CDalConfig objDalConstant = ConfigManager.GetConfig <CDalConfig>();

                CUserManager tempUserManager = new CUserManager();
                CLogin       objLogin        = new CLogin();
                CUserInfo    objUserInfo     = new CUserInfo();

                //objUserInfo.UserName = UserLabel.Text.Trim();

                //objUserInfo.Password = LoginTextBox.Text.Trim();


                objLogin = (RmsRemote.CLogin)Activator.GetObject(typeof(RmsRemote.CLogin), objCommonConstant.RemoteURL);

                CResult objResult = objLogin.ProcessAdminLogin(objUserInfo);

                if (objResult.IsSuccess && objResult.Data != null)
                {
                    CUserLogin objUserLogin = (CUserLogin)objResult.Data;

                    objCommonConstant.UserInfo = objUserLogin.UserInfo;

                    objDalConstant.ConnectionString = objUserLogin.ConnectionStr;
                    RMSGlobal.LogInUserName         = objCommonConstant.UserInfo.UserName;

                    objCommonConstant.DBConnection = objUserLogin.ConnectionStr;

                    RMSAdminMdiForm objParent = new RMSAdminMdiForm();  //Previous
                    objParent.Show();
                    this.Hide();
                }
                else
                {
                    //g_ErrorLabel.Show();
                }
            }
            catch (Exception exp)
            {
                MessageBox.Show(exp.Message, RMSGlobal.MessageBoxTitle,
                                MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Esempio n. 3
0
        private void UserButton_Click(object sender, EventArgs e)
        {
            CCurrentUser.User_name = ((UserButton)sender).TouchButton.Text;
            AuthenticationForm objAuthentication = AuthenticationForm.CreateInstance(((UserButton)sender).rmsUserName.Text);
            DialogResult drResult = objAuthentication.ShowDialog();
            if (drResult == DialogResult.OK)
            {
                RMSAdminMdiForm objParent = new RMSAdminMdiForm();  //Previous
                objParent.Show();

                this.Visible = false;
            }
        }
Esempio n. 4
0
        private void ProcessLogin()
        {
            try
            {
                CCommonConstants objCommonConstant = ConfigManager.GetConfig<CCommonConstants>();

                CDalConfig objDalConstant = ConfigManager.GetConfig<CDalConfig>();

                CUserManager tempUserManager = new CUserManager();
                CLogin objLogin = new CLogin();
                CUserInfo objUserInfo = new CUserInfo();

                //objUserInfo.UserName = UserLabel.Text.Trim();

                //objUserInfo.Password = LoginTextBox.Text.Trim();

                objLogin = (RmsRemote.CLogin)Activator.GetObject(typeof(RmsRemote.CLogin), objCommonConstant.RemoteURL);

                CResult objResult = objLogin.ProcessAdminLogin(objUserInfo);

                if (objResult.IsSuccess && objResult.Data != null)
                {
                    CUserLogin objUserLogin = (CUserLogin)objResult.Data;

                    objCommonConstant.UserInfo = objUserLogin.UserInfo;

                    objDalConstant.ConnectionString = objUserLogin.ConnectionStr;
                    RMSGlobal.LogInUserName = objCommonConstant.UserInfo.UserName;

                    objCommonConstant.DBConnection = objUserLogin.ConnectionStr;

                    RMSAdminMdiForm objParent = new RMSAdminMdiForm();  //Previous
                    objParent.Show();
                    this.Hide();
                }
                else
                {
                    //g_ErrorLabel.Show();
                }
            }
            catch (Exception exp)
            {
                MessageBox.Show(exp.Message, RMSGlobal.MessageBoxTitle,
                   MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Esempio n. 5
0
 public ProductSalesCtl(RMSAdminMdiForm p_parent)
 {
     InitializeComponent();
     m_parentForm = p_parent;
 }
Esempio n. 6
0
 public ProductSalesCtl(RMSAdminMdiForm p_parent)
 {
     InitializeComponent();
     m_parentForm = p_parent;
 }