예제 #1
0
 public ActionResult addType(MallType model)
 {
     if (ModelState.IsValid)
     {
         model.MallNum = 0;
         model         = malltypeBll.Add(model);
         if (model.Id > 0)
         {
             Response.Write("添加成功");
         }
         else
         {
             ModelState.AddModelError("", "添加失败!");
         }
     }
     return(View());
 }
예제 #2
0
 public ActionResult add(Malls model)
 {
     if (ModelState.IsValid)
     {
         model = mallsBll.Add(model);
         if (model.Id > 0)
         {
             //在商城分类下数量加1
             MallType type = malltypeBll.Find(mt => mt.Id == model.MallTypeId);
             type.MallNum += 1;
             malltypeBll.Update(type);
             return(RedirectToAction("list"));// Response.Write("添加成功");
         }
         else
         {
             ModelState.AddModelError("", "添加失败!");
         }
     }
     return(View());
 }
예제 #3
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (UserId != 0)
            {
                hash ^= UserId.GetHashCode();
            }
            if (MallId != 0)
            {
                hash ^= MallId.GetHashCode();
            }
            if (MallType != 0)
            {
                hash ^= MallType.GetHashCode();
            }
            if (BuyNum != 0)
            {
                hash ^= BuyNum.GetHashCode();
            }
            return(hash);
        }
예제 #4
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (MallId != 0)
            {
                hash ^= MallId.GetHashCode();
            }
            if (MallType != 0)
            {
                hash ^= MallType.GetHashCode();
            }
            if (MallSort != 0)
            {
                hash ^= MallSort.GetHashCode();
            }
            if (MoneyType != 0)
            {
                hash ^= MoneyType.GetHashCode();
            }
            if (MallName.Length != 0)
            {
                hash ^= MallName.GetHashCode();
            }
            if (MallDesc.Length != 0)
            {
                hash ^= MallDesc.GetHashCode();
            }
            if (GiftImage.Length != 0)
            {
                hash ^= GiftImage.GetHashCode();
            }
            if (Slot != 0)
            {
                hash ^= Slot.GetHashCode();
            }
            if (MallLabel != 0)
            {
                hash ^= MallLabel.GetHashCode();
            }
            if (LabelImage.Length != 0)
            {
                hash ^= LabelImage.GetHashCode();
            }
            if (RealPrice != 0)
            {
                hash ^= RealPrice.GetHashCode();
            }
            if (OriginalPrice != 0)
            {
                hash ^= OriginalPrice.GetHashCode();
            }
            if (BuyMax != 0)
            {
                hash ^= BuyMax.GetHashCode();
            }
            hash ^= award_.GetHashCode();
            if (StartTime != 0L)
            {
                hash ^= StartTime.GetHashCode();
            }
            if (EndTime != 0L)
            {
                hash ^= EndTime.GetHashCode();
            }
            return(hash);
        }