private static List<Category> SaveCategories(ServiceReference2.StaticClient b, User usr)
        {
            var allCat = b.GetAllCategories(usr.UserId);
            var allReasons = b.GetAllTypeTransactionReasons(usr.UserId);

            var catList = new CategoryList();
            var reasonList = new TypeTransactionReasonList();

            allReasons.ForEach(x=>reasonList.Add(x));
            var newCat = new Category(usr, reasonList);
            newCat = allCat[2];
            newCat.TypeTransactionReasons[1].IsDeleted = true;
            newCat.TypeTransactionReasons[1].ModifiedDate = DateTime.Now;

            newCat.HasChanges = true;
            newCat.ModifiedDate = DateTime.Now;

            //newCat.Name = "CarTest";

            //if (newCat.TypeTransactionReasons == null)
            //    newCat.TypeTransactionReasons = new List<TypeTransactionReason>();

            //newCat.TypeTransactionReasons.Add(allReasons[0]);
            //newCat.TypeTransactionReasons.Add(allReasons[1]);

            //var transReasonList = new List<TypeTransactionReason>();
            //var transReason = new TypeTransactionReason(usr);
            //transReason.Name = "CarTest";


            catList.Add(newCat);

            catList.OptimizeOnTopLevel();

            var result = b.SaveCategories(catList.ToList());
            //var arrC = st.ToList();

            //var c = b.SaveCategories(st.Categories);

            return result;
        }