Example #1
0
        public bool Update(int id, DeliveryGroup deliveryGroup)
        {
            DeliveryGroup deliveryGroups = _deliveryGroupRepository.FindById(a => a.Id == id);

            deliveryGroups.DeliveryBoyId = deliveryGroup.DeliveryBoyId;
            deliveryGroups.Priority      = deliveryGroup.Priority;
            deliveryGroups.SubZoneId     = deliveryGroup.SubZoneId;
            _deliveryGroupRepository.Update(deliveryGroup);
            return(_deliveryGroupRepository.Save() > 0);
        }
 public void Submit(DeliveryGroup deliveryGroup)
 {
     SubmitValidate(deliveryGroup);
     if (deliveryGroup.Id > 0)
     {
         _deliveryGroupRepository.Update(deliveryGroup);
     }
     else
     {
         _deliveryGroupRepository.Insert(deliveryGroup);
     }
     _unitOfWork.Commit();
 }