Ejemplo n.º 1
0
        public int CreateRegistration(Loginprofile LogObj)
        {
            using (SqlConnection con = new SqlConnection(connstring))
            {
                SqlCommand com = new SqlCommand("sp_SaveRegstration", con);
                com.CommandType = CommandType.StoredProcedure;
                com.Parameters.AddWithValue("@Firstname", LogObj.Firstname);
                com.Parameters.AddWithValue("@Lastname", LogObj.Lastname);
                com.Parameters.AddWithValue("@Birthdate", LogObj.Birthdate);
                com.Parameters.AddWithValue("@Hno", LogObj.Hno);
                com.Parameters.AddWithValue("@Street", LogObj.Street);
                com.Parameters.AddWithValue("@City", LogObj.City);
                com.Parameters.AddWithValue("@State", LogObj.State);
                com.Parameters.AddWithValue("@Country", LogObj.Country);
                com.Parameters.AddWithValue("@Pincode", LogObj.Pincode);
                com.Parameters.AddWithValue("@ContactNo", LogObj.ContactNo);
                com.Parameters.AddWithValue("@Email", LogObj.Email);
                com.Parameters.AddWithValue("@Loginname", LogObj.Loginname);
                com.Parameters.AddWithValue("@Password", LogObj.Password);
                com.Parameters.AddWithValue("@Squestionid", LogObj.Squestionid);
                com.Parameters.AddWithValue("@Sanswer", LogObj.Sanswer);

                con.Open();
                int i = com.ExecuteNonQuery();
                con.Close();
                if (i >= 1)
                {
                    return(1);
                }
                else
                {
                    return(0);
                }
            }
        }
Ejemplo n.º 2
0
 public DataSet GetUserLoginInfo(Loginprofile LogObj)
 {
     using (SqlConnection con = new SqlConnection(connstring))
     {
         try
         {
             con.Open();
             SqlCommand cmd = new SqlCommand("sp_Get_LoginInfo", con);
             cmd.CommandType = CommandType.StoredProcedure;
             cmd.Parameters.AddWithValue("@LoginName", LogObj.Loginname);
             cmd.Parameters.AddWithValue("@Password", LogObj.Password);
             SqlDataAdapter da = new SqlDataAdapter(cmd);
             DataSet        Ds = new DataSet();
             da.Fill(Ds);
             return(Ds);
         }
         catch (Exception ex)
         {
             throw ex;
         }
     }
 }
Ejemplo n.º 3
0
 public int CreateRegistration(Loginprofile LogObj)
 {
     return(regObj.CreateRegistration(LogObj));
 }
Ejemplo n.º 4
0
 public DataSet GetUserLoginInfo(Loginprofile LogObj)
 {
     return(LogObj_.GetUserLoginInfo(LogObj));
 }