示例#1
0
    public Membership GetMembershipDetail()
    {
        try
        {
            DALuser.Open();
            SqlDataReader dr = DbManager.GetDataReader("select * from tblUser_Plan where Member_ID='" + User_Id + "' and ActivationStatus='A'");

            bool       IsValidate = false;
            Membership ObjReturn  = null;

            IsValidate = dr.HasRows;
            if (IsValidate)
            {
                ObjReturn           = new Membership();
                ObjReturn.StartDate = Convert.ToDateTime(dr["Start_date"].ToString());
                ObjReturn.EndDate   = Convert.ToDateTime(dr["End_date"].ToString());

                ObjReturn.PlaneID = dr["Plan_Id"].ToString();
            }
            dr.Close();
            DALuser.Close();
            return(ObjReturn);
        }
        catch (Exception ex)
        {
            throw;
        }
    }
示例#2
0
    public bool CheckUser(User user)
    {

        try
        {
            DALuser.Open();
            SqlDataReader dr = DbManager.GetDataReader("select * from tblMember where Email='" + user.Email + "' and Password='******'");
            bool IsValidate = false;
            IsValidate = dr.HasRows;
            if (dr.HasRows)
            {
                while (dr.Read())
                {
                    user.Gender = dr["Gender"].ToString();
                    user.IsVerified = dr["IsVerified"].ToString().ToCharArray()[0];
                    user.User_Id = dr["Member_Id"].ToString();
                }
            }
            dr.Close();
            DALuser.Close();
            return IsValidate;
        }
        catch (Exception ex)
        {
            throw;
        }
    }
示例#3
0
 public User GetDetail(User user)
 {
     try
     {
         DALuser.Open();
         SqlDataReader dr = DbManager.GetDataReader("select * from tblMember where Email='" + user.Email + "'");
         
         if (dr.HasRows)
         {
             while (dr.Read())
             {
                 user.Password = dr["Password"].ToString();
                 user.User_Name = dr["Member_Name"].ToString();
                 user.Mobile =Convert.ToInt64( dr["Mobile"].ToString());
                 user.Dob = Convert.ToDateTime( dr["Dob"].ToString());
                 user.User_Id = dr["Member_Id"].ToString();
                 
             }
         }
         dr.Close();
         DALuser.Close();
         return user;
     }
     catch (Exception ex)
     {
         throw;
     }
 }
示例#4
0
 public bool checkEmail(User user)
 {
     try
     {
         DALuser.Open();
         SqlDataReader dr = DbManager.GetDataReader("select * from tblMember where Email='" + user.Email + "'");
         bool IsValidate = false;
         IsValidate = dr.HasRows;
        
         dr.Close();
         DALuser.Close();
         return IsValidate;
     }
     catch (Exception ex)
     {
         throw;
     }
 }
示例#5
0
    public bool CheckMembershipExists()
    {
        try
        {
            DALuser.Open();
            SqlDataReader dr = DbManager.GetDataReader("select * from tblUser_Plan where Member_ID='" + User_Id + "' and ActivationStatus='A'");

            bool IsValidate = false;
            IsValidate = dr.HasRows;

            dr.Close();
            DALuser.Close();
            return(IsValidate);
        }
        catch (Exception ex)
        {
            throw;
        }
    }
    public bool checkAlbumSetting()
    {
        try
        {
            DALuser.Open();
            SqlDataReader dr = DbManager.GetDataReader("  select * from tblAlbum where Permission=3  and MemberId='" + Recever + "'");

            bool IsValidate = false;
            IsValidate = dr.HasRows;

            dr.Close();
            DALuser.Close();
            return(IsValidate);
        }
        catch (Exception ex)
        {
            throw;
        }
    }
    public bool checkPhotoReq()
    {
        try
        {
            DALuser.Open();
            SqlDataReader dr = DbManager.GetDataReader("select * from tblPhotoRequest where ReceiverId='" + Recever + "' and SenderId='" + Sender + "'");

            bool IsValidate = false;
            IsValidate = dr.HasRows;

            dr.Close();
            DALuser.Close();
            return(IsValidate);
        }
        catch (Exception ex)
        {
            throw;
        }
    }
示例#8
0
    public int GetPlaneDuration()
    {
        try
        {
            int returnVal = 0;
            DALuser.Open();
            SqlDataReader dr = DbManager.GetDataReader("select * from tblMembership_Plane where PlanId='" + PlaneID + "' and ActivationStatus='A'");

            bool IsValidate = false;
            IsValidate = dr.HasRows;
            while (dr.Read())
            {
                returnVal = Convert.ToInt32(dr["PlanDuration"].ToString());
            }
            dr.Close();
            DALuser.Close();
            return(returnVal);
        }
        catch
        {
            throw;
        }
    }
示例#9
0
 public string GetPassword(User user)
 {
     try
     {
         DALuser.Open();
         SqlDataReader dr = DbManager.GetDataReader("select Password from tblMember where Email='" + user.Email + "'");
         string IsValidate = "";
         if (dr.HasRows)
         {
             while (dr.Read())
             {
                 IsValidate = dr["Password"].ToString();
             }
         }
         dr.Close();
         DALuser.Close();
         return IsValidate;
     }
     catch (Exception ex)
     {
         throw;
     }
 }