コード例 #1
0
 public static int AddUser(Users user)
 {
     try
     {
         wlSQL objWLSql = new wlSQL();
         objWLSql.AddParameter("@FirstName", DbType.String, ParameterDirection.Input, 0, user.FirstName);
         objWLSql.AddParameter("@LastName", DbType.String, ParameterDirection.Input, 0, user.LastName);
         objWLSql.AddParameter("@EmailAddress", DbType.String, ParameterDirection.Input, 0, user.EmailAddress);
         objWLSql.AddParameter("@StatusID", DbType.Int32, ParameterDirection.Input, 0, user.StatusID);
         objWLSql.AddParameter("@CreatedBy", DbType.Int32, ParameterDirection.Input, 0, user.CreatedBy);
         return(Convert.ToInt32(objWLSql.ExecuteScalar("p_Users_ins")));
     }
     catch (Exception ex)
     {
         throw wlLogging.HandleEx(ex);
     }
 }
コード例 #2
0
 public static string ValidateExternalUser(External externalUser)
 {
     try
     {
         wlSQL objWLSql = new wlSQL();
         objWLSql.AddParameter("@SocialID", DbType.String, ParameterDirection.Input, 0, externalUser.Id);
         objWLSql.AddParameter("@LastName", DbType.String, ParameterDirection.Input, 0, externalUser.LastName);
         objWLSql.AddParameter("@FirstName", DbType.String, ParameterDirection.Input, 0, externalUser.FirstName);
         objWLSql.AddParameter("@Email", DbType.String, ParameterDirection.Input, 0, externalUser.Email);
         objWLSql.AddParameter("@PhotoUrl", DbType.String, ParameterDirection.Input, 0, externalUser.PhotoUrl);
         return(Convert.ToString(objWLSql.ExecuteScalar("p_Users_ins_External")));
     }
     catch (Exception ex)
     {
         throw wlLogging.HandleEx(ex);
     }
 }
コード例 #3
0
 public static int AddProduct(CarsProduct carsProduct)
 {
     try
     {
         wlSQL objWLSql = new wlSQL();
         objWLSql.AddParameter("@paramType", DbType.Int32, ParameterDirection.Input, 0, 2);
         objWLSql.AddParameter("@CarsProductName1", DbType.String, ParameterDirection.Input, 0, carsProduct.CarsProductName1);
         objWLSql.AddParameter("@CarsProductDescription", DbType.String, ParameterDirection.Input, 0, carsProduct.CarsProductDescription);
         objWLSql.AddParameter("@CarsColor", DbType.String, ParameterDirection.Input, 0, carsProduct.CarsColor);
         objWLSql.AddParameter("@CarsDoors", DbType.Int32, ParameterDirection.Input, 0, carsProduct.CarsDoors);
         objWLSql.AddParameter("@CarsKilometers", DbType.Int32, ParameterDirection.Input, 0, carsProduct.CarsKilometers);
         objWLSql.AddParameter("@CarsPrice", DbType.Int32, ParameterDirection.Input, 0, carsProduct.CarsPrice);
         objWLSql.AddParameter("@IsActive", DbType.String, ParameterDirection.Input, 0, carsProduct.IsActive);
         objWLSql.AddParameter("@SessionId", DbType.String, ParameterDirection.Input, 0, carsProduct.SessionId);
         //objWLSql.AddParameter("@CreatedBy", DbType.String, ParameterDirection.Input, 0, carsProduct.CreatedBy);
         return(Convert.ToInt32(objWLSql.ExecuteScalar("emi_carproduct")));
     }
     catch (Exception ex)
     {
         throw wlLogging.HandleEx(ex);
     }
 }
コード例 #4
0
        public static bool IsExistUser(string loginUserName)
        {
            try
            {
                wlSQL objWLSql = new wlSQL();
                objWLSql.AddParameter("@LoginUserName", DbType.String, ParameterDirection.Input, 0, loginUserName);
                object o    = objWLSql.ExecuteScalar("p_Users_sel_IsExistUser");
                bool   flag = false;
                if (o != null)
                {
                    int count = Convert.ToInt32(o.ToString(), CultureInfo.CurrentCulture);
                    if (count > 0)
                    {
                        flag = true;
                    }
                }

                return(flag);
            }
            catch (Exception ex)
            {
                throw wlLogging.HandleEx(ex);
            }
        }