public ActionResult Edit(MSBuildLogsExtended.AspNetMvc40ViewModel.BuildItemVM vm) { try { log.Info(string.Format("{0}: Edit", Framework.LoggingOptions.UI_Process_Started.ToString())); MSBuildLogsExtended.DataSourceEntities.Build entity = MSBuildLogsExtended.EntityContracts.IBuildHelper.Clone <MSBuildLogsExtended.DataSourceEntities.Build.Default, MSBuildLogsExtended.DataSourceEntities.Build>(vm.Item); var _Response = MSBuildLogsExtended.CommonBLLIoC.IoCBuild.UpdateEntity(entity); log.Info(string.Format("{0}: Edit", Framework.LoggingOptions.UI_Process_Ended.ToString())); return(RedirectToAction(UrlStringsAlias.ActionName_Build_Index)); } catch (Exception ex) { Framework.UIAction uiAction = Framework.UIAction.Update; vm.ContentData.Title = Framework.Resources.UIStringResource.EditAlternativeText; vm.ContentData.Summary = MSBuildLogsExtended.Resources.UIStringResourcePerEntityBuild.Edit_Build; vm.StatusOfResult = Framework.CommonBLLEntities.BusinessLogicLayerResponseStatus.MessageErrorDetected; vm.StatusMessageOfResult = ex.Message; vm.UIActionStatusMessage = new Framework.UIActionStatusMessage(typeof(MSBuildLogsExtended.AspNetMvc40ViewModel.BuildItemVM).FullName, uiAction.ToString(), uiAction, Framework.UIActionStatus.Failed); log.Error(string.Format("{0}: {1}, {2}, {3}", uiAction, Framework.LoggingOptions.UI_Process_Failed.ToString(), vm.StatusOfResult, vm.StatusMessageOfResult)); return(View(vm)); } }
public ActionResult AddNew(MSBuildLogsExtended.AspNetMvc40ViewModel.BuildItemVM vm) { try { log.Info(string.Format("{0}: AddNew", Framework.LoggingOptions.UI_Process_Started.ToString())); MSBuildLogsExtended.DataSourceEntities.Build entity = MSBuildLogsExtended.EntityContracts.IBuildHelper.Clone <MSBuildLogsExtended.DataSourceEntities.Build.Default, MSBuildLogsExtended.DataSourceEntities.Build>(vm.Item); var _Response = MSBuildLogsExtended.CommonBLLIoC.IoCBuild.InsertEntity(entity); TempData[TempDataKey_BuildController_Copy] = null; TempData.Remove(TempDataKey_BuildController_Copy); log.Info(string.Format("{0}: Insert", Framework.LoggingOptions.UI_Process_Ended.ToString())); return(RedirectToAction(UrlStringsAlias.ActionName_Build_Index)); } catch (Exception ex) { Framework.UIAction uiAction = Framework.UIAction.ViewDetails; var entity = CreateEmptyEntityOrGetFromTempData(TempDataKey_BuildController_Copy); vm = MSBuildLogsExtended.AspNetMvc40ViewModel.BuildItemVM.CreateNewViewModel(entity); vm.StatusOfResult = Framework.CommonBLLEntities.BusinessLogicLayerResponseStatus.MessageErrorDetected; vm.StatusMessageOfResult = ex.Message; vm.UIActionStatusMessage = new Framework.UIActionStatusMessage(typeof(MSBuildLogsExtended.AspNetMvc40ViewModel.BuildItemVM).FullName, uiAction.ToString(), uiAction, Framework.UIActionStatus.Failed); log.Error(string.Format("{0}: AddNew: {1}", Framework.LoggingOptions.Business_Logic_Layer_Process_Failed.ToString(), ex.Message)); return(View(vm)); } }
public ActionResult Delete(bool isToCompareIdByIdentifierOftOfByIdentifier, System.Int64 valueToCompareIdByIdentifierOftOfByIdentifier) { Framework.UIAction uiAction = Framework.UIAction.Delete; MSBuildLogsExtended.AspNetMvc40ViewModel.BuildItemVM vm = MSBuildLogsExtended.AspNetMvc40ViewModel.BuildItemVM.Load(isToCompareIdByIdentifierOftOfByIdentifier, valueToCompareIdByIdentifierOftOfByIdentifier, uiAction); vm.ContentData.Title = Framework.Resources.UIStringResource.DeleteAlternativeText; vm.ContentData.Summary = MSBuildLogsExtended.Resources.UIStringResourcePerEntityBuild.Delete_Build; return(View(vm)); }
public ActionResult AddNew() { Framework.NameValueCollection nameValueCollectionOfMSBuildLogsExtended_Solution = MSBuildLogsExtended.CommonBLLIoC.IoCSolution.GetCollectionOfNameValuePairOfAll(new MSBuildLogsExtended.CommonBLLEntities.SolutionChainedQueryCriteriaAll(), new Framework.EntityContracts.QueryPagingSetting(), null); ViewBag.SelectListOfMSBuildLogsExtended_Solution = Framework.Mvc.MvcHelper.BuildListOfSelectListItem(nameValueCollectionOfMSBuildLogsExtended_Solution); var entity = CreateEmptyEntityOrGetFromTempData(TempDataKey_BuildController_Copy); MSBuildLogsExtended.AspNetMvc40ViewModel.BuildItemVM vm = MSBuildLogsExtended.AspNetMvc40ViewModel.BuildItemVM.CreateNewViewModel(entity); return(View(vm)); }
public ActionResult Edit(bool isToCompareIdByIdentifierOftOfByIdentifier, System.Int64 valueToCompareIdByIdentifierOftOfByIdentifier) { Framework.NameValueCollection nameValueCollectionOfMSBuildLogsExtended_Solution = MSBuildLogsExtended.CommonBLLIoC.IoCSolution.GetCollectionOfNameValuePairOfAll(new MSBuildLogsExtended.CommonBLLEntities.SolutionChainedQueryCriteriaAll(), new Framework.EntityContracts.QueryPagingSetting(), null); ViewBag.SelectListOfMSBuildLogsExtended_Solution = Framework.Mvc.MvcHelper.BuildListOfSelectListItem(nameValueCollectionOfMSBuildLogsExtended_Solution); Framework.UIAction uiAction = Framework.UIAction.Update; MSBuildLogsExtended.AspNetMvc40ViewModel.BuildItemVM vm = MSBuildLogsExtended.AspNetMvc40ViewModel.BuildItemVM.Load(isToCompareIdByIdentifierOftOfByIdentifier, valueToCompareIdByIdentifierOftOfByIdentifier, uiAction); vm.ContentData.Title = Framework.Resources.UIStringResource.EditAlternativeText; vm.ContentData.Summary = MSBuildLogsExtended.Resources.UIStringResourcePerEntityBuild.Edit_Build; return(View(vm)); }
public static BuildItemVM CreateNewViewModel(MSBuildLogsExtended.DataSourceEntities.Build.Default entity) { Framework.UIAction uiAction = Framework.UIAction.Create; BuildItemVM vm = new BuildItemVM(); vm.ContentData.Title = Framework.Resources.UIStringResource.AddNewAlternativeText; vm.ContentData.Summary = MSBuildLogsExtended.Resources.UIStringResourcePerEntityBuild.AddNew_Build; vm.Item = entity; vm.UIActionStatusMessage = new Framework.UIActionStatusMessage(typeof(BuildItemVM).FullName, uiAction.ToString(), uiAction, Framework.UIActionStatus.Launch); return(vm); }
public static BuildItemVM Load(bool isToCompareIdByIdentifierOftOfByIdentifier, System.Int64 valueToCompareIdByIdentifierOftOfByIdentifier , Framework.UIAction uiAction) { BuildItemVM vm = new BuildItemVM(); try { log.Info(string.Format("{0}: Details", Framework.LoggingOptions.UI_Process_Started.ToString())); MSBuildLogsExtended.CommonBLLEntities.BuildResponseMessageBuiltIn.Default _Response = MSBuildLogsExtended.CommonBLLIoC.IoCBuild.GetMessageOfDefaultOfByIdentifier(isToCompareIdByIdentifierOftOfByIdentifier && valueToCompareIdByIdentifierOftOfByIdentifier != default(System.Int64), valueToCompareIdByIdentifierOftOfByIdentifier, -1, -1, null); if (_Response.BusinessLogicLayerResponseStatus == Framework.CommonBLLEntities.BusinessLogicLayerResponseStatus.MessageOK || _Response.BusinessLogicLayerResponseStatus == Framework.CommonBLLEntities.BusinessLogicLayerResponseStatus.UIProcessReady) { vm.Item = _Response.Message[0]; vm.UIActionStatusMessage = new Framework.UIActionStatusMessage(typeof(BuildItemVM).FullName, uiAction.ToString(), uiAction, Framework.UIActionStatus.Launch); log.Info(string.Format("{0}: {1}", uiAction, Framework.LoggingOptions.UI_Process_Succeeded.ToString())); } else { vm.StatusOfResult = _Response.BusinessLogicLayerResponseStatus; vm.StatusMessageOfResult = _Response.ServerErrorMessage; vm.UIActionStatusMessage = new Framework.UIActionStatusMessage(typeof(BuildItemVM).FullName, uiAction.ToString(), uiAction, Framework.UIActionStatus.Failed); log.Error(string.Format("{0}: {1}, {2}, {3}", uiAction, Framework.LoggingOptions.UI_Process_Failed.ToString(), vm.StatusOfResult, vm.StatusMessageOfResult)); } } catch (Exception ex) { vm.StatusOfResult = Framework.CommonBLLEntities.BusinessLogicLayerResponseStatus.MessageErrorDetected; vm.StatusMessageOfResult = ex.Message; vm.UIActionStatusMessage = new Framework.UIActionStatusMessage(typeof(BuildItemVM).FullName, uiAction.ToString(), uiAction, Framework.UIActionStatus.Failed); log.Error(string.Format("{0}: {1}, {2}, {3}", uiAction, Framework.LoggingOptions.UI_Process_Failed.ToString(), vm.StatusOfResult, vm.StatusMessageOfResult)); } return(vm); }
public ActionResult Delete(bool isToCompareIdByIdentifierOftOfByIdentifier, System.Int64 valueToCompareIdByIdentifierOftOfByIdentifier, MSBuildLogsExtended.AspNetMvc40ViewModel.BuildItemVM vm, FormCollection collection) { try { log.Info(string.Format("{0}: Delete", Framework.LoggingOptions.UI_Process_Started.ToString())); var _Response = MSBuildLogsExtended.CommonBLLIoC.IoCBuild.ExistsOfEntityOfByIdentifier(isToCompareIdByIdentifierOftOfByIdentifier, valueToCompareIdByIdentifierOftOfByIdentifier, -1, -1, null); if (_Response) { MSBuildLogsExtended.DataSourceEntities.Build entity = MSBuildLogsExtended.EntityContracts.IBuildHelper.Clone <MSBuildLogsExtended.DataSourceEntities.Build.Default, MSBuildLogsExtended.DataSourceEntities.Build>(vm.Item); MSBuildLogsExtended.CommonBLLIoC.IoCBuild.DeleteEntity(entity); log.Info(string.Format("{0}: Delete", Framework.LoggingOptions.UI_Process_Ended.ToString())); } else { log.Warn(string.Format("{0}: Delete, Entity not exists", Framework.LoggingOptions.UI_Process_Ended.ToString())); } return(RedirectToAction("UrlStringsAlias.ActionName_Build_Index")); } catch (Exception ex) { Framework.UIAction uiAction = Framework.UIAction.Delete; vm.ContentData.Title = Framework.Resources.UIStringResource.DeleteAlternativeText; vm.ContentData.Summary = MSBuildLogsExtended.Resources.UIStringResourcePerEntityBuild.Delete_Build; vm.StatusOfResult = Framework.CommonBLLEntities.BusinessLogicLayerResponseStatus.MessageErrorDetected; vm.StatusMessageOfResult = ex.Message; vm.UIActionStatusMessage = new Framework.UIActionStatusMessage(typeof(MSBuildLogsExtended.AspNetMvc40ViewModel.BuildItemVM).FullName, uiAction.ToString(), uiAction, Framework.UIActionStatus.Failed); log.Error(string.Format("{0}: {1}, {2}, {3}", uiAction, Framework.LoggingOptions.UI_Process_Failed.ToString(), vm.StatusOfResult, vm.StatusMessageOfResult)); return(View(vm)); } }