public void Test_MarketingBudget_FilterByBudget() { Console.WriteLine("To get user as per filter budget.\n"); List <RevenuePlanner.Services.MarketingBudget.UserPermission> Data = _marketingBudget.FilterByBudget(BudgetId, ApplicationId); Assert.IsNotNull(Data); Assert.IsTrue(Data.Count > 0); }
/// <summary> /// Added by Nandish Shah /// Get specific record based on dropdown selection value of budgetdetail id /// </summary> public JsonResult GetUserFilterByBudget(int BudgetId = 0, string level = "", string FlagCondition = "") { // Sessions.BudgetDetailId = BudgetId; string strUserPermission = _MarketingBudget.CheckUserPermission(BudgetId, Sessions.User.CID, Sessions.User.ID); if (strUserPermission == "Edit") { ViewBag.FlagCondition = "Edit"; } else { ViewBag.FlagCondition = "View"; } List <UserPermission> _user = _MarketingBudget.FilterByBudget(BudgetId, Sessions.ApplicationId); return(Json(new { _user = _user, Flag = ViewBag.FlagCondition }, JsonRequestBehavior.AllowGet)); }