public ActionResult GetUnitTypeList(string costCenterId)
        {
            var           unitTypes = _mUnitTypeRepository.GetByCostCenterId(costCenterId);
            StringBuilder sb        = new StringBuilder();
            MUnitType     unitType;

            sb.AppendFormat("{0}:{1}", string.Empty, "-Pilih Tipe Unit-");
            for (int i = 0; i < unitTypes.Count; i++)
            {
                unitType = unitTypes[i];
                sb.AppendFormat(";{0}:{1}", unitType.Id, unitType.UnitTypeName);
            }
            return(Content(sb.ToString()));
        }
        public ActionResult ListForSubGrid(string id)
        {
            var unitTypes = _mUnitTypeRepository.GetByCostCenterId(id);

            var jsonData = new
            {
                rows = (
                    from unitType in unitTypes
                    select new
                {
                    i = unitType.Id.ToString(),
                    cell = new string[]
                    {
                        unitType.UnitTypeName,
                        unitType.UnitTypeTotal.HasValue ? unitType.UnitTypeTotal.Value.ToString(Helper.CommonHelper.NumberFormat) : null,
                        unitType.UnitTypeDesc
                    }
                }
                    ).ToArray()
            };

            return(Json(jsonData, JsonRequestBehavior.AllowGet));
        }