public PartialViewResult SetDepreciationRate(long AssetPurchaseId)
        {
            var purchaseNo = _repPurchaseAsset.GetAssetPurchaseDetails()
                             .Where(x => x.Id == AssetPurchaseId)
                             .SingleOrDefault().PurchaseNo;

            ViewBag.Title = String.Concat(Constant.SET_DEPRECIATION_RATE, " for ", purchaseNo);

            var depreciationRate = _repDepreciation.GetDepreciationRate(AssetPurchaseId);

            var pidvm = new PurchasedItemDepreciationViewModel()
            {
                DepreciationRate = (depreciationRate != null) ? depreciationRate.Rate : 0,
                AssetPurchaseId  = AssetPurchaseId
            };

            /***************************************************************************/
            //Depreciation Type List
            List <SelectListItem> objDepreciationTypeList = new List <SelectListItem>();

            objDepreciationTypeList.Add(new SelectListItem {
                Text = "-- Select Depreciation Type --", Value = ""
            });
            objDepreciationTypeList.Add(new SelectListItem {
                Text = "Fixed Depreciation", Value = "fixed"
            });
            objDepreciationTypeList.Add(new SelectListItem {
                Text = "Diminishing Depreciation", Value = "diminishing"
            });
            pidvm.DepreciationTypeList = objDepreciationTypeList;
            pidvm.DepreciationType     = (depreciationRate != null) ? depreciationRate.DepreciationType : "";
            /***************************************************************************/

            return(PartialView(pidvm));
        }
        public PartialViewResult SetDepreciationForAll(string dateString, long assetId)
        {
            ViewBag.Title = Constant.SET_DEPRECIATION_ALL;

            var pidvm = new PurchasedItemDepreciationViewModel();

            /***************************************************************************/
            //Depreciation Type List
            var objDepreciationTypeList = new List <SelectListItem>();

            objDepreciationTypeList.Add(new SelectListItem {
                Text = "-- Select Depreciation Type --", Value = ""
            });
            objDepreciationTypeList.Add(new SelectListItem {
                Text = "Fixed Depreciation", Value = "fixed"
            });
            objDepreciationTypeList.Add(new SelectListItem {
                Text = "Diminishing Depreciation", Value = "diminishing"
            });
            pidvm.DepreciationTypeList = objDepreciationTypeList;
            /***************************************************************************/

            return(PartialView(pidvm));
        }