Esempio n. 1
0
        public BaseClassBL()
        {
            dbContext = new ETEMDataModelEntities();


            this.RequestMeasure = new RequestMeasure("BaseClassBL");
        }
Esempio n. 2
0
        protected void btnLogin_Click(object sender, EventArgs e)
        {
            this.lbError.Text = string.Empty;
            RequestMeasure requestMeasure = new RequestMeasure("btnLogin_Click");

            CallContext resultContext = AdminClientRef.Login(this.tbxUserName.Text, this.tbxPassword.Text);

            LogDebug(requestMeasure.ToString());

            if (resultContext.ResultCode == ETEMEnums.ResultEnum.Success)
            {
                this.userProps = new UserProps();

                ETEMModel.Models.User currentUser = AdminClientRef.GetUserByUserID(resultContext.EntityID);

                if (currentUser != null)
                {
                    this.userProps = MakeLoginByUserID(resultContext.EntityID);

                    LogDebug("Потребител " + this.userProps.UserName + " влезе в системата");

                    Response.Redirect(Welcome.formResource.PagePath);
                }
                else
                {
                    this.lbError.Text = ETEMModel.Helpers.BaseHelper.GetCaptionString("Съществува проблем с базата данни");
                }
            }
            else
            {
                this.lbError.Text = resultContext.Message;
            }
        }