public ActionResult Edit(MSBuildLogsExtended.AspNetMvc40ViewModel.BuildLogItemVM vm)
        {
            try
            {
                log.Info(string.Format("{0}: Edit", Framework.LoggingOptions.UI_Process_Started.ToString()));

                MSBuildLogsExtended.DataSourceEntities.BuildLog entity = MSBuildLogsExtended.EntityContracts.IBuildLogHelper.Clone <MSBuildLogsExtended.DataSourceEntities.BuildLog.Default, MSBuildLogsExtended.DataSourceEntities.BuildLog>(vm.Item);
                var _Response = MSBuildLogsExtended.CommonBLLIoC.IoCBuildLog.UpdateEntity(entity);


                log.Info(string.Format("{0}: Edit", Framework.LoggingOptions.UI_Process_Ended.ToString()));
                return(RedirectToAction(UrlStringsAlias.ActionName_BuildLog_Index));
            }
            catch (Exception ex)
            {
                Framework.UIAction uiAction = Framework.UIAction.Update;
                vm.ContentData.Title     = Framework.Resources.UIStringResource.EditAlternativeText;
                vm.ContentData.Summary   = MSBuildLogsExtended.Resources.UIStringResourcePerEntityBuildLog.Edit_BuildLog;
                vm.StatusOfResult        = Framework.CommonBLLEntities.BusinessLogicLayerResponseStatus.MessageErrorDetected;
                vm.StatusMessageOfResult = ex.Message;
                vm.UIActionStatusMessage = new Framework.UIActionStatusMessage(typeof(MSBuildLogsExtended.AspNetMvc40ViewModel.BuildLogItemVM).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.BuildLogItemVM vm)
        {
            try
            {
                log.Info(string.Format("{0}: AddNew", Framework.LoggingOptions.UI_Process_Started.ToString()));

                MSBuildLogsExtended.DataSourceEntities.BuildLog entity = MSBuildLogsExtended.EntityContracts.IBuildLogHelper.Clone <MSBuildLogsExtended.DataSourceEntities.BuildLog.Default, MSBuildLogsExtended.DataSourceEntities.BuildLog>(vm.Item);

                var _Response = MSBuildLogsExtended.CommonBLLIoC.IoCBuildLog.InsertEntity(entity);



                TempData[TempDataKey_BuildLogController_Copy] = null;
                TempData.Remove(TempDataKey_BuildLogController_Copy);
                log.Info(string.Format("{0}: Insert", Framework.LoggingOptions.UI_Process_Ended.ToString()));

                return(RedirectToAction(UrlStringsAlias.ActionName_BuildLog_Index));
            }
            catch (Exception ex)
            {
                Framework.UIAction uiAction = Framework.UIAction.ViewDetails;
                var entity = CreateEmptyEntityOrGetFromTempData(TempDataKey_BuildLogController_Copy);
                vm = MSBuildLogsExtended.AspNetMvc40ViewModel.BuildLogItemVM.CreateNewViewModel(entity);
                vm.StatusOfResult        = Framework.CommonBLLEntities.BusinessLogicLayerResponseStatus.MessageErrorDetected;
                vm.StatusMessageOfResult = ex.Message;
                vm.UIActionStatusMessage = new Framework.UIActionStatusMessage(typeof(MSBuildLogsExtended.AspNetMvc40ViewModel.BuildLogItemVM).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.BuildLogItemVM vm = MSBuildLogsExtended.AspNetMvc40ViewModel.BuildLogItemVM.Load(isToCompareIdByIdentifierOftOfByIdentifier, valueToCompareIdByIdentifierOftOfByIdentifier, uiAction);
     vm.ContentData.Title   = Framework.Resources.UIStringResource.DeleteAlternativeText;
     vm.ContentData.Summary = MSBuildLogsExtended.Resources.UIStringResourcePerEntityBuildLog.Delete_BuildLog;
     return(View(vm));
 }
Esempio n. 4
0
        public static BuildLogItemVM CreateNewViewModel(MSBuildLogsExtended.DataSourceEntities.BuildLog.Default entity)
        {
            Framework.UIAction uiAction = Framework.UIAction.Create;
            BuildLogItemVM     vm       = new BuildLogItemVM();

            vm.ContentData.Title   = Framework.Resources.UIStringResource.AddNewAlternativeText;
            vm.ContentData.Summary = MSBuildLogsExtended.Resources.UIStringResourcePerEntityBuildLog.AddNew_BuildLog;

            vm.Item = entity;
            vm.UIActionStatusMessage = new Framework.UIActionStatusMessage(typeof(BuildLogItemVM).FullName, uiAction.ToString(), uiAction, Framework.UIActionStatus.Launch);

            return(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);

            Framework.NameValueCollection nameValueCollectionOfMSBuildLogsExtended_BuildEventCode = MSBuildLogsExtended.CommonBLLIoC.IoCBuildEventCode.GetCollectionOfNameValuePairOfAll(new MSBuildLogsExtended.CommonBLLEntities.BuildEventCodeChainedQueryCriteriaAll(), new Framework.EntityContracts.QueryPagingSetting(), null);
            ViewBag.SelectListOfMSBuildLogsExtended_BuildEventCode = Framework.Mvc.MvcHelper.BuildListOfSelectListItem(nameValueCollectionOfMSBuildLogsExtended_BuildEventCode);


            var entity = CreateEmptyEntityOrGetFromTempData(TempDataKey_BuildLogController_Copy);

            MSBuildLogsExtended.AspNetMvc40ViewModel.BuildLogItemVM vm = MSBuildLogsExtended.AspNetMvc40ViewModel.BuildLogItemVM.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.NameValueCollection nameValueCollectionOfMSBuildLogsExtended_BuildEventCode = MSBuildLogsExtended.CommonBLLIoC.IoCBuildEventCode.GetCollectionOfNameValuePairOfAll(new MSBuildLogsExtended.CommonBLLEntities.BuildEventCodeChainedQueryCriteriaAll(), new Framework.EntityContracts.QueryPagingSetting(), null);
            ViewBag.SelectListOfMSBuildLogsExtended_BuildEventCode = Framework.Mvc.MvcHelper.BuildListOfSelectListItem(nameValueCollectionOfMSBuildLogsExtended_BuildEventCode);


            Framework.UIAction uiAction = Framework.UIAction.Update;
            MSBuildLogsExtended.AspNetMvc40ViewModel.BuildLogItemVM vm = MSBuildLogsExtended.AspNetMvc40ViewModel.BuildLogItemVM.Load(isToCompareIdByIdentifierOftOfByIdentifier, valueToCompareIdByIdentifierOftOfByIdentifier, uiAction);
            vm.ContentData.Title   = Framework.Resources.UIStringResource.EditAlternativeText;
            vm.ContentData.Summary = MSBuildLogsExtended.Resources.UIStringResourcePerEntityBuildLog.Edit_BuildLog;

            return(View(vm));
        }
Esempio n. 7
0
        public static BuildLogItemVM Load(bool isToCompareIdByIdentifierOftOfByIdentifier, System.Int64 valueToCompareIdByIdentifierOftOfByIdentifier
                                          , Framework.UIAction uiAction)
        {
            BuildLogItemVM vm = new BuildLogItemVM();

            try
            {
                log.Info(string.Format("{0}: Details", Framework.LoggingOptions.UI_Process_Started.ToString()));

                MSBuildLogsExtended.CommonBLLEntities.BuildLogResponseMessageBuiltIn.Default _Response =
                    MSBuildLogsExtended.CommonBLLIoC.IoCBuildLog.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(BuildLogItemVM).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(BuildLogItemVM).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(BuildLogItemVM).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.BuildLogItemVM vm, FormCollection collection)
        {
            try
            {
                log.Info(string.Format("{0}: Delete", Framework.LoggingOptions.UI_Process_Started.ToString()));
                var _Response = MSBuildLogsExtended.CommonBLLIoC.IoCBuildLog.ExistsOfEntityOfByIdentifier(isToCompareIdByIdentifierOftOfByIdentifier, valueToCompareIdByIdentifierOftOfByIdentifier, -1, -1, null);
                if (_Response)
                {
                    MSBuildLogsExtended.DataSourceEntities.BuildLog entity = MSBuildLogsExtended.EntityContracts.IBuildLogHelper.Clone <MSBuildLogsExtended.DataSourceEntities.BuildLog.Default, MSBuildLogsExtended.DataSourceEntities.BuildLog>(vm.Item);
                    MSBuildLogsExtended.CommonBLLIoC.IoCBuildLog.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_BuildLog_Index"));
            }
            catch (Exception ex)
            {
                Framework.UIAction uiAction = Framework.UIAction.Delete;
                vm.ContentData.Title     = Framework.Resources.UIStringResource.DeleteAlternativeText;
                vm.ContentData.Summary   = MSBuildLogsExtended.Resources.UIStringResourcePerEntityBuildLog.Delete_BuildLog;
                vm.StatusOfResult        = Framework.CommonBLLEntities.BusinessLogicLayerResponseStatus.MessageErrorDetected;
                vm.StatusMessageOfResult = ex.Message;
                vm.UIActionStatusMessage = new Framework.UIActionStatusMessage(typeof(MSBuildLogsExtended.AspNetMvc40ViewModel.BuildLogItemVM).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));
            }
        }