private static string AppendUserData(User user, CustomResource template)
 {
     var str = template.Value.Replace("#NAME#", user.UserName);
     str = str.Replace("#DATA#", DateTime.Now.ToShortDateString());
     // TODO : �������� �������� ���� ...
     return str;
 }
 public ActionResult EditContract()
 {
     var customResource = _customResorces.GetResource("Contract_View");
     if (customResource == null)
     {
         var newCustomResource = new CustomResource { Key = "Contract_View" };
         return View(newCustomResource);
     }
     return View(customResource);
 }
 public ActionResult EditOrder()
 {
     var customResource = _customResorces.GetResource("Order_View");
     if (customResource == null)
     {
         var newCustomResource = new CustomResource { Key = "Order_View" };
         return View(newCustomResource);
     }
     return View(customResource);
 }
 public ActionResult SaveResource(string customText, string Key)
 {
     var resource = new CustomResource { Key = Key, Value = customText };
     return View("EditOrder", _customResorces.EditResource(resource));
 }
 public CustomResource EditResource(CustomResource resource)
 {
     return _repository.EditResource(resource);
 }