public ActionResult SetDepreciationRate(long id, FormCollection fc) //id => AssetPurchaseId
        {
            //Check if Depreciation Rate exists for Purchase ID (edit purpose)
            var     depnRateObj      = _repDepreciation.GetDepreciationRate(id);
            decimal existingDepnRate = (depnRateObj != null) ? depnRateObj.Rate : 0;
            string  existingDepnType = (depnRateObj != null) ? depnRateObj.DepreciationType : "";

            var purchaseNo = _repPurchaseAsset.GetAssetPurchaseDetails()
                             .Where(x => x.Id == id)
                             .SingleOrDefault().PurchaseNo;

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

            var sdfvm = new SetDepreciationFirstViewModel()
            {
                DepreciationRate      = Decimal.Parse(fc["formValue[DepreciationRate]"]),
                AssetPurchaseId       = id,
                DepreciationType      = fc["formValue[DepreciationType]"],
                CurrentYear           = DateTime.Now.Year.ToString(),
                RateStatus            = 1,
                DepreciationEntryDate = DateTime.Now
            };

            int isDepreciated = 0;

            if (depnRateObj == null)
            {
                //Creates/Sets Depreciation rate for individual purchase Id
                isDepreciated = _repDepreciation.SetDepreciationForIndividual(sdfvm);
            }
            else
            {
                //Updates/Sets Depreciation rate for individual purchase Id
                isDepreciated = _repDepreciation.UpdateSetDepreciationForIndividual(sdfvm);
            }

            var json = JsonConvert.SerializeObject(sdfvm);

            return(Json(json));
        }