Exemplo n.º 1
0
 /// <summary>
 /// Delete a pickup area ZIP
 /// </summary>
 public virtual void DeletePickupAreaZip(PickupAreaZip data)
 {
     string sql = "EXEC PickupAreasZIP_Delete @PickInStoreZipGroupId";
     var sqlParams = new List<SqlParameter>
     {
         new SqlParameter("PickInStoreZipGroupId", data.Id)
     };
     var result = _dbContext.ExecuteSqlCommand(sql, false, null, sqlParams.ToArray());
 }
Exemplo n.º 2
0
        public ActionResult DeletePickupAreaZip(PickupAreaZip data)
        {
            if (!_permissionService.Authorize(StandardPermissionProvider.ManageShippingSettings))
                return AccessDeniedView();

            try
            {
                _shippingService.DeletePickupAreaZip(data);

                return new HttpStatusCodeResult(200);
            }
            catch
            {
                return new HttpStatusCodeResult(System.Net.HttpStatusCode.BadRequest);
            }
        }
Exemplo n.º 3
0
 /// <summary>
 /// Edit a pickup area ZIP
 /// </summary>
 public virtual void UpdatePickupAreaZip(PickupAreaZip data)
 {
     string sql = "EXEC PickupAreasZIP_Update @Name, @ZipCode";
     var sqlParams = new List<SqlParameter>
     {
         new SqlParameter("Name", data.Name ?? (object)DBNull.Value),
         new SqlParameter("ZipCode", data.ZipCode ?? (object)DBNull.Value),
     };
     var result = _dbContext.ExecuteSqlCommand(sql, false, null, sqlParams.ToArray());
 }