Esempio n. 1
0
 public tbl_PostageBands SavePostageBand(tbl_PostageBands postageBand)
 {
     return PostageBandsRepository.Save(postageBand);
 }
Esempio n. 2
0
 public JsonResult DeleteBand(tbl_PostageBands postageBand)
 {
     ECommerceService.DeletePostageBand(postageBand.PostageBandID);
     return Json(new { success = true, id = postageBand.PostageBandID });
 }
Esempio n. 3
0
 /// <summary>
 /// Create a new tbl_PostageBands object.
 /// </summary>
 /// <param name="postageBandID">Initial value of the PostageBandID property.</param>
 /// <param name="pB_DomainID">Initial value of the PB_DomainID property.</param>
 /// <param name="pB_Lower">Initial value of the PB_Lower property.</param>
 /// <param name="pB_Upper">Initial value of the PB_Upper property.</param>
 public static tbl_PostageBands Createtbl_PostageBands(global::System.Int32 postageBandID, global::System.Int32 pB_DomainID, global::System.Decimal pB_Lower, global::System.Decimal pB_Upper)
 {
     tbl_PostageBands tbl_PostageBands = new tbl_PostageBands();
     tbl_PostageBands.PostageBandID = postageBandID;
     tbl_PostageBands.PB_DomainID = pB_DomainID;
     tbl_PostageBands.PB_Lower = pB_Lower;
     tbl_PostageBands.PB_Upper = pB_Upper;
     return tbl_PostageBands;
 }
Esempio n. 4
0
 public JsonResult SaveBand(tbl_PostageBands band)
 {
     if (ModelState.IsValid)
     {
         if (band.PB_Lower > band.PB_Upper)
             return Json(new { success = false });
         tbl_PostageBands savedBand = ECommerceService.SavePostageBand(band);
         if (savedBand != null)
         {
             var jsonBand = new PostageBandModel
             {
                 PostageBandID = savedBand.PostageBandID,
                 PB_DomainID = savedBand.PB_DomainID,
                 PB_Lower = savedBand.PB_Lower,
                 PB_Upper = savedBand.PB_Upper
             };
             return Json(new { success = true, band = jsonBand });
         }
     }
     return Json(new { success = false });
 }
Esempio n. 5
0
 /// <summary>
 /// Deprecated Method for adding a new object to the tbl_PostageBands EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddTotbl_PostageBands(tbl_PostageBands tbl_PostageBands)
 {
     base.AddObject("tbl_PostageBands", tbl_PostageBands);
 }