public async Task <IActionResult> PutFunctionalities(int id, Functionalities functionalities) { if (id != functionalities.idFunctionalities) { return(BadRequest()); } _context.Entry(functionalities).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!FunctionalitiesExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
private bool RoleHasFunctionality(Functionalities functionality) { if (_rol == null || _rol.Functionalities == null) { return(false); } return(_rol.Functionalities.Contains(functionality)); }
public void InsertRoleFunctionality(Rol rol, Functionalities functionality) { SqlDataAccess.ExecuteNonQuery(ConfigurationManager.ConnectionStrings["GrouponConnectionString"].ToString(), "GRUPO_N.InsertRoleFunctionality", SqlDataAccessArgs .CreateWith("@Rol_ID", rol.ID) .And("@Funcionalidad", functionality.ToString()) .Arguments); }
public void GivenILaunchTheApplication() { IWebDriver webDriver = new ChromeDriver(); webDriver.Manage().Window.Maximize(); webDriver.Navigate().GoToUrl("https://adoring-pasteur-3ae17d.netlify.app"); productPage = new Functionalities(webDriver); }
public void InsertRoleFunctionality(Rol rol, Functionalities functionality)//Inserta las funcionalidades a un rol { SqlDataAccess.ExecuteNonQuery(ConfigurationManager.ConnectionStrings["StringConexion"].ToString(), "[SHARPS].InsertRoleFunctionality", SqlDataAccessArgs .CreateWith("@Rol_ID", rol.ID) .And("@Funcionalidad", functionality.ToString()) .Arguments); }
public async Task <ActionResult <Functionalities> > PostFunctionalities(Functionalities functionalities) { if (FunctionalitiesExistType(functionalities.Type)) { return(BadRequest("This Type as been registered!")); } _context.Functionalities.Add(functionalities); await _context.SaveChangesAsync(); return(CreatedAtAction("GetFunctionalities", new { id = functionalities.idFunctionalities }, functionalities)); }
public async Task UpdateFunctionality(Functionalities Functionality) { if (_db != null) { var existingFunctionality = _db.Functionalities.Where(s => s.FunctionalityId == Functionality.FunctionalityId).FirstOrDefault <Functionalities>(); if (existingFunctionality != null) { existingFunctionality.Name = Functionality.Name; existingFunctionality.StatusId = Functionality.StatusId; }//Commit the transaction await _db.SaveChangesAsync(); } }
public static bool Update(Functionalities bean) { StringBuilder sql = new StringBuilder(); sql.Append("UPDATE [FUNCTIONALITIES] "); sql.Append("SET [FUN_NAME]=@FUN_NAME "); sql.Append("WHERE [FUN_PK]=@FUN_PK "); int rowsAffected = DbCon.Execute(sql.ToString(), bean); if (rowsAffected > 0) { return(true); } return(false); }
public static bool Insert(Functionalities bean) { StringBuilder sql = new StringBuilder(); sql.Append("INSERT INTO [FUNCTIONALITIES] "); sql.Append("([FUN_PK], [FUN_NAME]) "); sql.Append("VALUES( @FUN_PK, @FUN_NAME)"); int rowsAffected = DbCon.Execute(sql.ToString(), bean); if (rowsAffected > 0) { return(true); } return(false); }
public async Task <int> AddFunctionality(Functionalities Functionality) { if (_db != null) { await _db.Functionalities.AddAsync(new Functionalities() { Name = Functionality.Name, StatusId = Functionality.StatusId }); await _db.SaveChangesAsync(); return(Functionality.FunctionalityId); } return(0); }
static void Main(string[] args) { //Main controller of the application Functionalities fc = new Functionalities(); fc.getTableNames(); fc.createTableInfoFiles(); fc.checkFilesForFreeSpaces(); Console.Write("This application allows you to play with tables, which can have up to 500 elements, "); Console.Write("you'll have to give me an Integer X number and a furniture, and I'll insert the furniture X times into the table,"); Console.Write("if it's not in there yet, "); Console.Write("if the table is full, the system will create a new table and insert the remaining date into the new table. "); Console.WriteLine(Messages.proceedMessage); Console.ReadKey(); Char selectedOption; do { //getting the values for the furniture and the number of times, the system's going to upload fc.getFurnitureFromUser(); fc.getNumberFromUser(); //Writing the current value of the furniture and the number fc.getCurrentFurniture(); fc.getNumberOfTimes(); //Choosing the next option (1 or 2) and retrieving the value fc.chooseNextOption(); selectedOption = fc.getSelectedOption(); }while (selectedOption != '1'); if (selectedOption == '1') { Console.Clear(); fc.upload(); Console.WriteLine("Done!"); Console.WriteLine("Thanks for checking out my app!"); } Console.ReadKey(); }
private void cardFileToolStripMenuItem_Click(object sender, EventArgs e) { if (Constants.changes) { DialogResult result = MessageBox.Show("Do you want to save the changes to your current cardfile?", "Save Changes", MessageBoxButtons.YesNo, MessageBoxIcon.Warning); if(result == DialogResult.Yes) // save current card file, then flush the buffer } SaveFileDialog dialog = new SaveFileDialog(); dialog.AddExtension = true; dialog.CheckPathExists = true; dialog.DefaultExt = ".xml"; dialog.InitialDirectory = Directory.GetCurrentDirectory(); dialog.OverwritePrompt = true; dialog.Title = "Save New CardFile As..."; dialog.Filter = "XML File|*.xml"; dialog.ShowDialog(); Functionalities.newCardFile(dialog.FileName); }
public void Deserialize(BinaryReader reader) { Functionality = (Functionalities)reader.ReadByte(); }
private void ShowFunction(Functionalities functToShow) { switch (functToShow) { case Functionalities.Add: functionalityPanelControl.Visible = true; functionalityLabelControl.Text = "Add a new task; Shortcut: Enter"; break; case Functionalities.Delete: functionalityPanelControl.Visible = true; functionalityLabelControl.Text = "Delete selected task; Shortcut: Del"; break; case Functionalities.Done: functionalityPanelControl.Visible = true; functionalityLabelControl.Text = "Show done tasks; Shortcut: D"; break; case Functionalities.Hide: functionalityPanelControl.Visible = true; functionalityLabelControl.Text = "Hide panel to just focus on tasks; Shortcut: H"; break; case Functionalities.Unhide: functionalityPanelControl.Visible = true; functionalityLabelControl.Text = "Show panel; Shortcut: S"; break; case Functionalities.None: functionalityPanelControl.Visible = false; break; case Functionalities.ndt: functionalityPanelControl.Visible = true; functionalityLabelControl.Text = "Switch to NowDoThis View; Shortcut: P"; break; case Functionalities.DelAll: functionalityPanelControl.Visible = true; functionalityLabelControl.Text = "Delete all Undone Tasks; Shortcut: Shift + del"; break; case Functionalities.Lists: functionalityPanelControl.Visible = true; functionalityLabelControl.Text = "Select from available lists; Shortcut: L"; break; } }
public bool IsInFunction(string functionality) { return(Functionalities.Contains(functionality)); }
public static bool HasFunctionality(this IConcentratorPrincipal principal, Functionalities functionalitiy) { return(principal.Functionalities.Any(x => x == functionalitiy.ToString())); }
public ShowFunctionalityMessage(Functionalities functionality) { Functionality = functionality; }