public static void Update(WorkflowDataModel workflow) { MySqlConnection connection = new MySqlConnection(ConfigurationManager.AppSettings[BusinessUtilies.Const.Database.AppSetting]); MySqlDataAdapter adapter = new MySqlDataAdapter("UpdateWorkflow", connection); adapter.SelectCommand.CommandType = CommandType.StoredProcedure; MySqlParameter paramID = new MySqlParameter("pID", workflow.ID); paramID.Direction = ParameterDirection.Input; adapter.SelectCommand.Parameters.Add(paramID); MySqlParameter paramName = new MySqlParameter("pName", workflow.Name); paramName.Direction = ParameterDirection.Input; adapter.SelectCommand.Parameters.Add(paramName); MySqlParameter paramCreatedBy = new MySqlParameter("pCreatedBy", workflow.CreatedBy); paramCreatedBy.Direction = ParameterDirection.Input; adapter.SelectCommand.Parameters.Add(paramCreatedBy); MySqlParameter paramDateCreated = new MySqlParameter("pDateCreated", workflow.DateCreated); paramDateCreated.Direction = ParameterDirection.Input; adapter.SelectCommand.Parameters.Add(paramDateCreated); DataTable results = new DataTable(); adapter.Fill(results); }
private void SetWorkflowData() { _workflowDataModel.WorkflowOption = _workflowToSelect; _workflowDataModel.DeletedFiles = false; _workflowDataModel.Images = false; _workflowDataModel = _workflowDataModel.OverrideDefaultValues(_workflowDataModel); }
public virtual void Update(WorkflowDataModel workflow) { if (workflow.ID > 0) { WorkflowDAL.Update(workflow); } else { throw new Exception("Page not found"); } }
public override void Create(WorkflowDataModel workflow) { if (!SecurityManager.SesionStarted()) { throw new Exception("Session not started"); } workflow.CreatedBy = SecurityManager.GetLoggedUser().ID; workflow.DateCreated = DateTime.Now; base.Create(workflow); }
public WorkflowDataModel OverrideDefaultValues(WorkflowDataModel newWorkflowDataModel) { if (!Multimedia) { VideoClassification = false; } if (!Images) { ImageRating = false; ImageClassification = false; } return(this); }
public void SetWorkflowMediaProcessingOptions(WorkflowDataModel workflowDataModel) { //TODO OV this options are only valid for certain workflow config. SelectOrDeselectkWorkflowMediaProcessingOption(_workflowDeletedFilesCheckbox, workflowDataModel.DeletedFiles); SelectOrDeselectkWorkflowMediaProcessingOption(_workflowLppCheckbox, workflowDataModel.Lpp); SelectOrDeselectkWorkflowMediaProcessingOption(_workflowMultimediaCheckbox, workflowDataModel.Multimedia); // SelectOrDeselectkWorkflowMediaProcessingOption(_workflowVideoClassificationCheckbox, workflowDataModel.VideoClassification); SelectOrDeselectkWorkflowMediaProcessingOption(_workflowImagesCheckbox, workflowDataModel.Images); SelectOrDeselectkWorkflowMediaProcessingOption(_workflowImageRatingCheckbox, workflowDataModel.ImageRating); //SelectOrDeselectkWorkflowMediaProcessingOption(_workflowImageClassificationCheckbox, workflowDataModel.ImageClassification); SelectOrDeselectkWorkflowMediaProcessingOption(_workflowContentCheckbox, workflowDataModel.Content); SelectOrDeselectkWorkflowMediaProcessingOption(_workflowEmailCheckbox, workflowDataModel.Email); SelectOrDeselectkWorkflowMediaProcessingOption(_workflowBrowserCheckbox, workflowDataModel.Browser); //SelectOrDeselectkWorkflowMediaProcessingOption(_workflowUacCheckbox, workflowDataModel.Uac); }
/// <summary> /// 初始化工作流 /// </summary> public void Start() { workModel = FindObjectOfType <WorkflowDataModel>(); entity = (WorkflowEntity)workModel.DataEntity; entity.SwitchToTargetWorkflow = "MaininterfaceWorkflowLogic"; var model1 = objSetting.GetComponent <DataModelBehaviour>(); setEntity = (SetUIEntity)model1.DataEntity; var model2 = objHelp.GetComponent <DataModelBehaviour>(); helpUIEntity = (HelpUIEntity)model2.DataEntity; var trans = GameObject.Find("Context"); var model3 = trans.GetComponent <DataModelBehaviour>(); showTextEntity = (ShowTextEntity)model3.DataEntity; }
/** * Based on the current behavior where by default all media processing options are selected. * */ public ExhibitsPage AddCustomWorkflow(WorkflowDataModel workflowDataModel) { SelectWorkflow(workflowDataModel.WorkflowOption); SetWorkflowMediaProcessingOptions(workflowDataModel); _saveCustomWorkflowLink.Click(); WaitForElementDisplayed(_driver, _customWorkflowNameInputField); _customWorkflowNameInputField.SendKeys(workflowDataModel.CustomWorkflowName); _saveCustomWorkflowButton.Click(); WaitForElementDisplayed(_driver, _deleteWorkflowLink); _driver.Navigate().Refresh(); _driver.SwitchTo().DefaultContent(); return(new ExhibitsPage(_driver)); }
public static WorkflowDataModel Get(int id) { WorkflowDataModel workflow = null; MySqlConnection connection = new MySqlConnection(ConfigurationManager.AppSettings[BusinessUtilies.Const.Database.AppSetting]); MySqlDataAdapter adapter = new MySqlDataAdapter("GetWorkflowByID", connection); MySqlParameter paramID = new MySqlParameter("pId", id); paramID.Direction = ParameterDirection.Input; adapter.SelectCommand.CommandType = CommandType.StoredProcedure; adapter.SelectCommand.Parameters.Add(paramID); DataTable results = new DataTable(); adapter.Fill(results); if (results.Rows.Count > 0) { DataRow item = results.Rows[0]; workflow = new WorkflowDataModel(); if (item["ID"].GetType() != typeof(DBNull)) { workflow.ID = Convert.ToInt32(item["ID"]); } if (item["Name"].GetType() != typeof(DBNull)) { workflow.Name = Convert.ToString(item["Name"]); } if (item["CreatedBy"].GetType() != typeof(DBNull)) { workflow.CreatedBy = Convert.ToInt32(item["CreatedBy"]); } if (item["DateCreated"].GetType() != typeof(DBNull)) { workflow.DateCreated = Convert.ToDateTime(item["DateCreated"]); } } return(workflow); }
public static List <WorkflowDataModel> GetAll() { List <WorkflowDataModel> workflows = new List <WorkflowDataModel>(); MySqlConnection connection = new MySqlConnection(ConfigurationManager.AppSettings[BusinessUtilies.Const.Database.AppSetting]); MySqlDataAdapter adapter = new MySqlDataAdapter("GetWorkflows", connection); DataTable results = new DataTable(); adapter.Fill(results); foreach (DataRow item in results.Rows) { WorkflowDataModel workflow = new WorkflowDataModel(); if (item["ID"].GetType() != typeof(DBNull)) { workflow.ID = Convert.ToInt32(item["ID"]); } if (item["Name"].GetType() != typeof(DBNull)) { workflow.Name = Convert.ToString(item["Name"]); } if (item["CreatedBy"].GetType() != typeof(DBNull)) { workflow.CreatedBy = Convert.ToInt32(item["CreatedBy"]); } if (item["DateCreated"].GetType() != typeof(DBNull)) { workflow.DateCreated = Convert.ToDateTime(item["DateCreated"]); } workflows.Add(workflow); } return(workflows); }
public virtual void Create(WorkflowDataModel workflow) { WorkflowDAL.Create(workflow); }
public ActionResult Create(WorkflowDataModel workflow) { WorkflowBO.GetInstance().Create(workflow); return(RedirectToAction("Index")); }