示例#1
0
 public ActionResult EditUnitPrice(string id, string RCityId, string GoodsType, string LandPrice1, string LandPrice2, string AirPrice1, string AirPrice2)
 {
     if (string.IsNullOrEmpty(id))
     {
         var entity = new SysUnitPrice();
         entity.GoodsTypeId = Convert.ToInt64(GoodsType.Trim());
         entity.RCityId     = Convert.ToInt32(RCityId.Trim());
         entity.LandPrice1  = Convert.ToDecimal(LandPrice1.Trim());
         entity.LandPrice2  = Convert.ToDecimal(LandPrice2.Trim());
         entity.AirPrice1   = Convert.ToDecimal(AirPrice1.Trim());
         entity.AirPrice2   = Convert.ToDecimal(AirPrice2.Trim());
         entity.CreateDate  = DateTime.Now;
         entity.IsDelete    = false;
         UnitPriceService.Current.AddUnitPrice(entity);
     }
     else
     {
         var entity = new SysUnitPrice();
         entity.Id          = Convert.ToInt64(id);
         entity.GoodsTypeId = Convert.ToInt64(GoodsType.Trim());
         entity.RCityId     = Convert.ToInt32(RCityId.Trim());
         entity.LandPrice1  = Convert.ToDecimal(LandPrice1.Trim());
         entity.LandPrice2  = Convert.ToDecimal(LandPrice2.Trim());
         entity.AirPrice1   = Convert.ToDecimal(AirPrice1.Trim());
         entity.AirPrice2   = Convert.ToDecimal(AirPrice2.Trim());
         entity.CreateDate  = DateTime.Now;
         UnitPriceService.Current.UpdateUnitPrice(entity);
     }
     return(Content("ok"));
 }
示例#2
0
 public ActionResult DeleteUnitPrice(string[] ids)
 {
     if (ids != null)
     {
         foreach (var id in ids)
         {
             var entity = new SysUnitPrice();
             entity.Id = Convert.ToInt64(id);
             UnitPriceService.Current.DeleteUnitPrice(entity);
         }
     }
     return(Content("ok"));
 }
示例#3
0
 public int Delete(SysUnitPrice entity)
 {
     try
     {
         Object result  = baseDao.Delete <SysUnitPrice>(entity);
         int    iReturn = Convert.ToInt32(result);
         return(iReturn);
     }
     catch (Exception ex)
     {
         throw new DalException("调用ActivityDirectRules时,访问Delete时出错", ex);
     }
 }
示例#4
0
 public long Insert(SysUnitPrice entity)
 {
     try
     {
         Object result  = baseDao.Insert <SysUnitPrice>(entity);
         long   iReturn = Convert.ToInt64(result);
         return(iReturn);
     }
     catch (Exception ex)
     {
         throw new DalException("调用ActivityDirectRules时,访问Update时出错", ex);
     }
 }
示例#5
0
 public int DeleteUnitPrice(SysUnitPrice entity)
 {
     return(_dao.Delete(entity));
 }
示例#6
0
 public int UpdateUnitPrice(SysUnitPrice entity)
 {
     return(_dao.Update(entity));
 }
示例#7
0
 public long AddUnitPrice(SysUnitPrice entity)
 {
     return(_dao.Insert(entity));
 }