public ActionResult GetTransactionsBySupplierByMonth(string id, string month) //id: user id
        {
            var userInfo  = UserManager.FindById(id);
            var profileId = userInfo.UserProfile.Id;

            var supplier = _merchantServie.FindSupplierBy(profileId);

            var transactions = _orderProcessingService.GetOrderItemssbyVendorByMonth(supplier.Id, month);

            return(PartialView("_TransactionsByVendor", transactions));
        }
Beispiel #2
0
        public ActionResult TransactionsBySupplierByMonth(string month) //id: suppler id
        {
            var userInfo  = UserManager.FindById(User.Identity.GetUserId());
            var profileId = userInfo.UserProfile.Id;

            var supplier = _merchantService.FindSupplierBy(profileId);

            var mth = "";

            switch (month)
            {
            case "January":
                mth = "1";
                break;

            case "Februray":
                mth = "2";
                break;

            case "March":
                mth = "3";
                break;

            case "April":
                mth = "4";
                break;

            case "May":
                mth = "5";
                break;

            case "June":
                mth = "6";
                break;

            case "July":
                mth = "7";
                break;

            case "August":
                mth = "8";
                break;

            case "September":
                mth = "9";
                break;

            case "October":
                mth = "10";
                break;

            case "November":
                mth = "11";
                break;

            case "December":
                mth = "12";
                break;
            }


            var transactions = _orderProcessingService.GetOrderItemssbyVendorByMonth(supplier.Id, mth);

            return(PartialView("_TransactionsByVendor", transactions));
        }