Пример #1
0
 private WoredaStockDistribution GetWoredaDetailMOdel(WoredaStockDistributionWithDetailViewModel distributionViewModel)
 {
     if (distributionViewModel != null)
     {
         var distributionModel = new WoredaStockDistribution()
         {
             WoredaStockDistributionID = distributionViewModel.WoredaStockDistributionID,
             ProgramID                = distributionViewModel.ProgramID,
             PlanID                   = distributionViewModel.PlanID,
             WoredaID                 = distributionViewModel.WoredaID,
             Month                    = distributionViewModel.Month,
             ActualBeneficairies      = distributionViewModel.ActualBeneficairies,
             MaleBetween5And18Years   = distributionViewModel.MaleBetween5And18Years,
             MaleLessThan5Years       = distributionViewModel.MaleLessThan5Years,
             MaleAbove18Years         = distributionViewModel.MaleAbove18Years,
             FemaleAbove18Years       = distributionViewModel.FemaleAbove18Years,
             FemaleBetween5And18Years = distributionViewModel.FemaleBetween5And18Years,
             FemaleLessThan5Years     = distributionViewModel.FemaleLessThan5Years,
             DirectSupport            = distributionViewModel.DirectSupport,
             PublicSupport            = distributionViewModel.PublicSupport
         };
         return(distributionModel);
     }
     return(null);
 }
Пример #2
0
 public bool DeleteHeaderDistribution(WoredaStockDistribution HeaderDistribution)
 {
     if (HeaderDistribution == null)
     {
         return(false);
     }
     _unitOfWork.WoredaStockDistributionRepository.Delete(HeaderDistribution);
     _unitOfWork.Save();
     return(true);
 }
Пример #3
0
        private WoredaStockDistributionWithDetailViewModel GetWoredaStockDistributionFormDB(WoredaStockDistribution woredaStockDistribution)
        {
            var woredaStockDistributionWithDetailViewModel = new WoredaStockDistributionWithDetailViewModel()
            {
                WoredaStockDistributionID = woredaStockDistribution.WoredaStockDistributionID,
                WoredaID                 = woredaStockDistribution.WoredaID,
                ProgramID                = woredaStockDistribution.ProgramID,
                PlanID                   = woredaStockDistribution.PlanID,
                Month                    = woredaStockDistribution.Month,
                DirectSupport            = woredaStockDistribution.DirectSupport,
                PublicSupport            = woredaStockDistribution.PublicSupport,
                ActualBeneficairies      = woredaStockDistribution.ActualBeneficairies,
                MaleBetween5And18Years   = woredaStockDistribution.MaleBetween5And18Years,
                MaleAbove18Years         = woredaStockDistribution.MaleAbove18Years,
                MaleLessThan5Years       = woredaStockDistribution.MaleLessThan5Years,
                FemaleAbove18Years       = woredaStockDistribution.FemaleAbove18Years,
                FemaleBetween5And18Years = woredaStockDistribution.FemaleBetween5And18Years,
            };

            return(woredaStockDistributionWithDetailViewModel);
        }
Пример #4
0
 public bool EditHeaderDistribution(WoredaStockDistribution HeaderDistribution)
 {
     _unitOfWork.WoredaStockDistributionRepository.Edit(HeaderDistribution);
     _unitOfWork.Save();
     return(true);
 }