Beispiel #1
0
        public HttpResponseMessage EmailValidation(HttpRequestMessage req, RP_EmailValidation rpEmailValidation)
        {
            if (rpEmailValidation != null)
            {
                RM_EmailValidation rmEmailValidation = new RM_EmailValidation();
                List<RPR_EmailValidation> rprEmailValidation = rmEmailValidation.EmailValidation(rpEmailValidation);

                if (rmEmailValidation._IsSuccess)
                    return req.CreateResponse<List<RPR_EmailValidation>>(HttpStatusCode.Created, rprEmailValidation);

                return req.CreateErrorResponse(HttpStatusCode.InternalServerError, "ServerError");
            }

            return req.CreateErrorResponse(HttpStatusCode.BadRequest, "Bad Request");
        }
Beispiel #2
0
 public List<RPR_EmailValidation> EmailValidation(RP_EmailValidation rpEmailValidation)
 {
     this.SpName = "DigitalMenu_EmailValidation"; //Sp Name
     _IsSuccess = true;
     try
     {
         SqlParameter[] param = new SqlParameter[1];
         param[0] = new SqlParameter("@EmailAdd", rpEmailValidation.EmailAdd);
         ds = db.GetDataSet(this.SpName, param);
         if (ds != null && ds.Tables.Count > 0)
         {
             rprEmailValidation = SerializeData.SerializeMultiValue<RPR_EmailValidation>(ds.Tables[0]);
         }
     }
     catch (Exception ex)
     {
         _IsSuccess = false;
         Logger.WriteLog(LogLevelL4N.ERROR, "Eamil Validation | Exception : " + ex.Message);
     }
     return rprEmailValidation;
 }