Ejemplo n.º 1
0
 public void Login(string url)
 {
     GoToUrl(url);
     LoginId.SendKeys($"***REMOVED***");
     Password.SendKeys($"***REMOVED***");
     LoginButton.Click();
 }
Ejemplo n.º 2
0
        public IActionResult loginId([FromBody] LoginId logins)
        {
            Hash hash = new Hash();

            logins.EmpPassword = hash.HashPassword(logins.EmpPassword);

            if (_service.LoginId(logins))
            {
                var data    = _service.GetEmployeeById(logins.EmpId);
                var Emprole = data.PositionPId;
                var Empid   = data.Id;
                var EmpName = data.EmpName;


                GetTokenModel token = GetToken.getToken(Emprole, Empid.ToString(), EmpName);

                return(Ok(new
                {
                    token = token.Token,
                    expiration = token.Expiretion
                }));
            }
            else
            {
                return(BadRequest("there error"));
            }
        }
        private bool ValidLogin()
        {
            bool isEmail = LoginId.Contains('@');

            bool passwordValid = !string.IsNullOrEmpty(Password);

            PasswordErrorMessage = !passwordValid ? "Password cannot be empty" : "OK";

            if (!isEmail)
            {
                if (LoginId.Length == 0)
                {
                    LoginIdErrorMessage = "This field cannot be empty";
                    return(false);
                }

                foreach (char character in LoginId)
                {
                    if (character < 48 || character > 57)
                    {
                        LoginIdErrorMessage = "A valid email must contain \"@\"";
                        return(false);
                    }
                }
            }

            LoginIdErrorMessage = "OK";

            return(passwordValid);
        }
Ejemplo n.º 4
0
 public IEnumerable <ValidationResult> Validate(ValidationContext validationContext)
 {
     if (!(LoginId.Contains(Vorname) ^ LoginId.Contains(Name)))
     {
         yield return(new ValidationResult("no, no no no"));
     }
 }
        public ActionResult SaveMedicalTestBillInfo(TestBill objTestBill, List <TestBillDetails> objTestBillDetails)
        {
            var laboratoryBilling = _objIInvoice.GetLaboratoryBillingDetailsById(0);

            laboratoryBilling.BILLNAME    = objTestBill.BILLNAME;
            laboratoryBilling.CONTACT     = objTestBill.CONTACT;
            laboratoryBilling.BILLDATE    = DateTime.Now;
            laboratoryBilling.CREATEDDATE = DateTime.Now;
            laboratoryBilling.BILLBY      = LoginId.ToString();
            var totalTax = objTestBillDetails.Select(x => x.TAXAMOUNT).Sum();

            laboratoryBilling.BILLAMOUNT = objTestBillDetails.Select(x => x.COST).Sum() + totalTax;
            objTestBillDetails.ForEach(x =>
            {
                laboratoryBilling.lmsLaboratoryBillingDetails.Add(new lmsLaboratoryBillingDetail
                {
                    TESTID     = x.TESTID,
                    ITEMCOST   = x.COST,
                    TESTRESULT = x.TESTRESULT,
                    TAXAMOUNT  = x.TAXAMOUNT
                });
            });

            var saveLaboratoryBillingDetails = _objIInvoice.SaveLaboratoryBilling(laboratoryBilling);

            return(Json(saveLaboratoryBillingDetails, JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 6
0
        public override int GetHashCode()
        {
            int hashCode = 1803674884;

            hashCode = hashCode * -1521134295 + Id.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Name);

            hashCode = hashCode * -1521134295 + IsIntermediate.GetHashCode();
            hashCode = hashCode * -1521134295 + IsDanger.GetHashCode();
            hashCode = hashCode * -1521134295 + IsProduction.GetHashCode();
            hashCode = hashCode * -1521134295 + IsActive.GetHashCode();
            hashCode = hashCode * -1521134295 + IntermediateNrD.GetHashCode();
            hashCode = hashCode * -1521134295 + ClpSignalWordId.GetHashCode();
            hashCode = hashCode * -1521134295 + ClpMsdsId.GetHashCode();
            hashCode = hashCode * -1521134295 + FunctionId.GetHashCode();
            hashCode = hashCode * -1521134295 + Price.GetHashCode();
            hashCode = hashCode * -1521134295 + CurrencyId.GetHashCode();
            hashCode = hashCode * -1521134295 + UnitId.GetHashCode();
            hashCode = hashCode * -1521134295 + Density.GetHashCode();
            hashCode = hashCode * -1521134295 + Solids.GetHashCode();
            hashCode = hashCode * -1521134295 + Ash450.GetHashCode();
            hashCode = hashCode * -1521134295 + VOC.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Remarks);

            hashCode = hashCode * -1521134295 + LoginId.GetHashCode();
            hashCode = hashCode * -1521134295 + DateCreated.GetHashCode();
            hashCode = hashCode * -1521134295 + DateUpdated.GetHashCode();
            return(hashCode);
        }
Ejemplo n.º 7
0
        public void ログインIdが255文字の場合正しく取得()
        {
            var loginId = "TestTextTestTextTestTextTestTextTestTextTestTextTestTextTestTextTestTextTestTextTestTextTestTextTestTextTestTextTestTextTestTextTestTextTestTextTestTextTestTextTestTextTestTextTestTextTestTextTestTextTestTextTestTextextTestTextTestTextTestTextTestTextTest";
            var act     = new LoginId(loginId);

            Assert.Equal(loginId, act.Value);
        }
Ejemplo n.º 8
0
        /// <summary>
        /// Check exists or not user with login
        /// </summary>
        /// <param name="inlogin">Test login</param>
        /// <returns>TRUE if such user exists in db, FALSE - if user dont exists in database</returns>
        public bool ExistsUser(LoginId inLogin)
        {
            //user logins case independent
            string login = inLogin.value;
            var    query = Query <DbUserLogin> .EQ(user => user.login, login);

            return(UserLogins.Count(query) > 0);
        }
Ejemplo n.º 9
0
        public void OnLogOut(LoginId login)
        {
            DbUserStat stat;

            if (TryGetValue(login.value, out stat))
            {
                m_Application.DbUserLogins.SaveStat(stat);
                TryRemove(login.value, out stat);
            }
        }
Ejemplo n.º 10
0
        /// <summary>
        /// called when user log out make
        /// </summary>
        /// <param name="loginId"></param>
        public void OnLogOut(LoginId login)
        {
            lock (this.syncRoot) {
                if (login != null)
                {
                    this.Remove(login.value);
                    log.InfoFormat("removed user = {0} yellow", login.value);
                }
            }

            DeleteNotValidUsers();
        }
        public Boolean Login(LoginId log)
        {
            var data = _context.Employees
                       .Where(c => c.EmpId == log.EmpId && c.EmpPassword == log.EmpPassword)
                       .Select(c => c.EmpId)
                       .FirstOrDefault();

            if (string.IsNullOrEmpty(data))
            {
                return(false);
            }
            else
            {
                return(true);
            }
        }
Ejemplo n.º 12
0
        public override int GetHashCode()
        {
            int hashCode = -1424578035;

            hashCode = hashCode * -1521134295 + Id.GetHashCode();
            hashCode = hashCode * -1521134295 + LabBookId.GetHashCode();
            hashCode = hashCode * -1521134295 + Version.GetHashCode();
            hashCode = hashCode * -1521134295 + Mass.GetHashCode();
            hashCode = hashCode * -1521134295 + Amount.GetHashCode();
            hashCode = hashCode * -1521134295 + ChangeDate.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Comment);

            hashCode = hashCode * -1521134295 + LoginId.GetHashCode();
            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(LoginShortcut);

            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Permision);

            hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Title);

            hashCode = hashCode * -1521134295 + Density.GetHashCode();
            return(hashCode);
        }
        public ActionResult SaveBillInfo(DrugBill objDrugBill, List <DrugBillDetails> objDrugBillDetails)
        {
            var medicalBilling = _objIInvoice.GetMedicalBillDetailsById(0);

            medicalBilling.BILLNAME    = objDrugBill.BILLNAME;
            medicalBilling.CONTACT     = objDrugBill.CONTACT;
            medicalBilling.BILLDATE    = DateTime.Now;
            medicalBilling.CREATEDDATE = DateTime.Now;
            var totalTax = objDrugBillDetails.Select(x => x.TAXAMOUNT).Sum();

            medicalBilling.BILLAMOUNT = objDrugBillDetails.Select(x => x.COST).Sum() + totalTax;
            medicalBilling.BILLBY     = LoginId.ToString();
            objDrugBillDetails.ForEach(x =>
            {
                medicalBilling.lmsMedicalBillingDetails.Add(new lmsMedicalBillingDetail
                {
                    DRUGID    = x.DRUGID,
                    QUANTITY  = x.QUANTITY,
                    ITEMCOST  = x.COST,
                    TAXAMOUNT = x.TAXAMOUNT
                });
            });

            #region <<Update Drug Quantity>>

            objDrugBillDetails.ForEach(x =>
            {
                var drugInfo = _objIHospitalMaster.GetDrugDetailsById(x.DRUGID);

                drugInfo.ORDERCOUNT = drugInfo.ORDERCOUNT - x.QUANTITY;
                _objIHospitalMaster.SaveDrug(drugInfo);
            });

            #endregion <<Update Drug Quantity>>

            var saveMedicalBillDetails = _objIInvoice.SaveMedicalBill(medicalBilling);
            return(Json(saveMedicalBillDetails, JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 14
0
 public override int GetHashCode()
 {
     unchecked
     {
         int hash = 17;
         hash = hash * 23 + (BirthDate == default(DateTime) ? 0 : BirthDate.GetHashCode());
         hash = hash * 23 + (BusinessEntityId == default(int) ? 0 : BusinessEntityId.GetHashCode());
         hash = hash * 23 + (CurrentFlag == default(bool) ? 0 : CurrentFlag.GetHashCode());
         hash = hash * 23 + (Gender == null ? 0 : Gender.GetHashCode());
         hash = hash * 23 + (HireDate == default(DateTime) ? 0 : HireDate.GetHashCode());
         hash = hash * 23 + (JobTitle == null ? 0 : JobTitle.GetHashCode());
         hash = hash * 23 + (LoginId == null ? 0 : LoginId.GetHashCode());
         hash = hash * 23 + (MaritalStatus == null ? 0 : MaritalStatus.GetHashCode());
         hash = hash * 23 + (ModifiedDate == default(DateTime) ? 0 : ModifiedDate.GetHashCode());
         hash = hash * 23 + (NationalIdNumber == null ? 0 : NationalIdNumber.GetHashCode());
         hash = hash * 23 + (OrganizationLevel == null ? 0 : OrganizationLevel.GetHashCode());
         hash = hash * 23 + (Rowguid == default(Guid) ? 0 : Rowguid.GetHashCode());
         hash = hash * 23 + (SalariedFlag == default(bool) ? 0 : SalariedFlag.GetHashCode());
         hash = hash * 23 + (SickLeaveHours == default(short) ? 0 : SickLeaveHours.GetHashCode());
         hash = hash * 23 + (VacationHours == default(short) ? 0 : VacationHours.GetHashCode());
         return(hash);
     }
 }
Ejemplo n.º 15
0
        private void BtnGiris_Click(object sender, EventArgs e)
        {
            if (txtKullaniciAdi.Text == string.Empty)
            {
                MessageBox.Show(@"Lütfen Kullanıcı Adınızı Giriniz.", "Tahmin Manager", MessageBoxButtons.OK, MessageBoxIcon.Error);
                txtKullaniciAdi.Focus();
                return;
            }

            if (txtSifre.Text == string.Empty)
            {
                MessageBox.Show("Lütfen Şifrenizi Kontrol Ediniz.", "Tahmin Manager", MessageBoxButtons.OK, MessageBoxIcon.Error);

                txtSifre.Focus();
                return;
            }

            baglanti.Open();
            SqlCommand    cmd  = new SqlCommand(@"SELECT kullaniciAdi,sifre,Id from Kullanicilar where kullaniciAdi = '" + txtKullaniciAdi.Text + "' and sifre = '" + txtSifre.Text + "'", baglanti);
            SqlDataReader data = cmd.ExecuteReader();

            while (data.Read())
            {
                kullaniciAdi = data[0].ToString();
                sifre        = data[1].ToString();
                personelId   = Convert.ToInt32(data[2].ToString());
            }

            baglanti.Close();



            if (sifre == txtSifre.Text)
            {
                baglanti.Open();
                SqlCommand    cmd2  = new SqlCommand("SELECT Id from kullanicilar where kullaniciAdi = '" + txtKullaniciAdi.Text + "' and sifre = '" + txtSifre.Text + "'", baglanti);
                SqlDataReader data2 = cmd2.ExecuteReader();

                while (data2.Read())
                {
                    KullaniciId = Convert.ToInt32(data2[0].ToString());
                }
                baglanti.Close();
                windowsKullaniciAdi = System.Windows.Forms.SystemInformation.UserName.ToString();
                bilgisayarAdi       = System.Environment.MachineName.ToString();
                IpAdresi            = GetIP();
                girisTarihi         = DateTime.Now.ToString("yyyy.MM.dd HH:mm:ss");

                baglanti.Open();
                SqlCommand loginKaydiEkle = new SqlCommand(String.Format("INSERT INTO login (KullaniciId,BilgisayarAdi,WindowsKullaniciAdi,GirisTarihi,Ip) VALUES ('{0}','{1}','{2}','{3}','{4}')", KullaniciId, bilgisayarAdi, windowsKullaniciAdi, girisTarihi, IpAdresi), baglanti);
                loginKaydiEkle.ExecuteNonQuery();
                baglanti.Close();

                baglanti.Open();
                SqlCommand    cmd3  = new SqlCommand("SELECT top 1 Id from Login order by Id desc ", baglanti);
                SqlDataReader data3 = cmd3.ExecuteReader();
                while (data3.Read())
                {
                    LoginId = data3[0].ToString();
                }

                baglanti.Close();

                this.Hide();
            }
            else
            {
                MessageBox.Show(@"Geçersiz Şifre", "Tahmin Manager", MessageBoxButtons.OK, MessageBoxIcon.Error);
                txtSifre.Focus();
                txtSifre.SelectAll();
                return;
            }
            x            = LoginId.ToString();
            kullaniciAdi = txtKullaniciAdi.Text;

            kullaniciId = KullaniciId;
            loginId     = Convert.ToInt32(LoginId);
            IP          = IpAdresi;
            kullanici   = kullaniciAdi;


            baglanti.Close();
            a.Show();
        }
 private void ProcessLoginIdMessage(string msg, string[] values)
 {
     LoginId?.Invoke(new LoginIdMessage(values[1]));
 }
Ejemplo n.º 17
0
 public LoginAuth(string login, string password)
 {
     m_Login    = new LoginId(login);
     m_Password = password;
 }
Ejemplo n.º 18
0
        public bool isValid()
        {
            bool RValue = true;

            lstValidation.Clear();

            if (string.IsNullOrWhiteSpace(UserName))
            {
                lstValidation.Add(new Validation()
                {
                    Name = nameof(UserName), Message = string.Format(Message.BLL.Required_Data, nameof(UserName))
                });
                RValue = false;
            }

            if (string.IsNullOrWhiteSpace(LoginId))
            {
                lstValidation.Add(new Validation()
                {
                    Name = nameof(LoginId), Message = string.Format(Message.BLL.Required_Data, nameof(LoginId))
                });
                RValue = false;
            }

            if (string.IsNullOrWhiteSpace(Password))
            {
                lstValidation.Add(new Validation()
                {
                    Name = nameof(Password), Message = string.Format(Message.BLL.Required_Data, nameof(Password))
                });
                RValue = false;
            }
            if (UserTypeId == 0)
            {
                lstValidation.Add(new Validation()
                {
                    Name = nameof(UserType), Message = string.Format(Message.BLL.Required_Data, nameof(UserType))
                });
                RValue = false;
            }
            else if (toList.Where(x => x.UserType.CompanyId == UserType.CompanyId && x.Id != Id && x.LoginId.ToLower() == LoginId.ToLower()).Count() > 0)
            {
                lstValidation.Add(new Validation()
                {
                    Name = nameof(LoginId), Message = string.Format(Message.BLL.Existing_Data, LoginId)
                });
                RValue = false;
            }
            else if (toList.Where(x => x.Id == 0 && x.UserType.CompanyId == UserType.CompanyId && x.LoginId.ToLower() == LoginId.ToLower()).Count() > 0)
            {
                lstValidation.Add(new Validation()
                {
                    Name = nameof(LoginId), Message = string.Format(Message.BLL.Existing_Data, LoginId)
                });
                RValue = false;
            }
            return(RValue);
        }
 public Boolean LoginId(LoginId log)
 {
     return(_service.LoginId(log));
 }
Ejemplo n.º 20
0
 public void SetLogin(LoginId lgn)
 {
     login = lgn;
 }
Ejemplo n.º 21
0
 protected void LoginId_LoginError(object sender, EventArgs e)
 {
     LoginId.FindControl("LinkButtonP").Visible = true;
 }