Exemplo n.º 1
0
        public User CheckLogin(User obj)
        {
            DataTable dt = new DataTable();

            dt = objbluser.CheckLogin(obj);
            User retobj = new User();

            if (dt != null)
            {
                if (dt.Rows.Count > 0)
                {
                    retobj.UserId     = Convert.ToInt32(dt.Rows[0]["UserId"].ToString());
                    retobj.FirstName  = dt.Rows[0]["FirstName"].ToString();
                    retobj.LastName   = dt.Rows[0]["LastName"].ToString();
                    retobj.InsertedBy = dt.Rows[0]["InsertedBy"].ToString();
                    retobj.InsertedOn = Convert.ToDateTime(dt.Rows[0]["InsertedOn"].ToString());
                    retobj.MobileNo   = dt.Rows[0]["ContactNo"].ToString();
                    //retobj.Password = dt.Rows[0]["Password"].ToString();
                    retobj.UpdatedBy  = dt.Rows[0]["UpdatedBy"].ToString();
                    retobj.UpdatedOn  = Convert.ToDateTime(dt.Rows[0]["UpdatedOn"].ToString());
                    retobj.UserTypeId = dt.Rows[0]["UserTypeId"].ToString();
                    retobj.Age        = Convert.ToInt32(dt.Rows[0]["Age"].ToString());
                    retobj.Gender     = dt.Rows[0]["Gender"].ToString();
                    retobj.Birthdate  = Convert.ToDateTime(dt.Rows[0]["BirthDate"].ToString());
                    retobj.EmailId    = dt.Rows[0]["EmailId"].ToString();
                    retobj.IsActive   = Convert.ToInt32(dt.Rows[0]["IsActive"].ToString());
                }
            }
            return(retobj);
        }