Leaf Input functional
This commit is contained in:
@@ -17,5 +17,32 @@ namespace LeafWeb.Web.Controllers
|
||||
DataService.Dispose();
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
protected bool IsHttpParamActionMatch()
|
||||
{
|
||||
return ControllerContext.RouteData.Values["action"].ToString()
|
||||
.Equals("Action", StringComparison.InvariantCultureIgnoreCase);
|
||||
}
|
||||
|
||||
protected enum StatusType
|
||||
{
|
||||
Info,
|
||||
Success,
|
||||
Error
|
||||
}
|
||||
|
||||
protected void SetStatusMessage(string msg, StatusType statusType = StatusType.Info)
|
||||
{
|
||||
TempData["StatusMessage"] = msg;
|
||||
switch (statusType)
|
||||
{
|
||||
case StatusType.Success:
|
||||
TempData["StatusMessage-Type"] = "alert-success";
|
||||
break;
|
||||
case StatusType.Error:
|
||||
TempData["StatusMessage-Type"] = "alert-error";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user