Exemplo n.º 1
0
 public tbl_PostageWeights SavePostageWeight(tbl_PostageWeights postageWeight)
 {
     return PostageWeightsRepository.Save(postageWeight);
 }
Exemplo n.º 2
0
 public JsonResult SaveWeight(tbl_PostageWeights postage)
 {
     if (ModelState.IsValid)
     {
         if (postage.PW_Lower > postage.PW_Upper)
             return Json(new { success = false });
         tbl_PostageWeights savedPostage = ECommerceService.SavePostageWeight(postage);
         if (savedPostage != null)
         {
             var jsonWeight = new PostageWeightModel
             {
                 PostageWeightID = savedPostage.PostageWeightID,
                 PW_DomainID = savedPostage.PW_DomainID,
                 PW_Lower = savedPostage.PW_Lower,
                 PW_Upper = savedPostage.PW_Upper
             };
             return Json(new { success = true, weight = jsonWeight });
         }
     }
     return Json(new { success = false });
 }
Exemplo n.º 3
0
 /// <summary>
 /// Create a new tbl_PostageWeights object.
 /// </summary>
 /// <param name="postageWeightID">Initial value of the PostageWeightID property.</param>
 /// <param name="pW_DomainID">Initial value of the PW_DomainID property.</param>
 /// <param name="pW_Lower">Initial value of the PW_Lower property.</param>
 /// <param name="pW_Upper">Initial value of the PW_Upper property.</param>
 public static tbl_PostageWeights Createtbl_PostageWeights(global::System.Int32 postageWeightID, global::System.Int32 pW_DomainID, global::System.Int32 pW_Lower, global::System.Int32 pW_Upper)
 {
     tbl_PostageWeights tbl_PostageWeights = new tbl_PostageWeights();
     tbl_PostageWeights.PostageWeightID = postageWeightID;
     tbl_PostageWeights.PW_DomainID = pW_DomainID;
     tbl_PostageWeights.PW_Lower = pW_Lower;
     tbl_PostageWeights.PW_Upper = pW_Upper;
     return tbl_PostageWeights;
 }
Exemplo n.º 4
0
 public JsonResult DeleteWeight(tbl_PostageWeights postageWeight)
 {
     ECommerceService.DeletePostageWeight(postageWeight.PostageWeightID);
     return Json(new { success = true, id = postageWeight.PostageWeightID });
 }
Exemplo n.º 5
0
 /// <summary>
 /// Deprecated Method for adding a new object to the tbl_PostageWeights EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddTotbl_PostageWeights(tbl_PostageWeights tbl_PostageWeights)
 {
     base.AddObject("tbl_PostageWeights", tbl_PostageWeights);
 }