Posted by Michael Horvath under Technology  on Aug 02 2021

Photo from PHOTOS PUBLIC DOMAIN.

As a way of mitigating possible false negative results in searching for foods in our food allergy checker, we have added a service of researching foods that are reported to not have any of your allergens. When you search and find a food that does not appear to have your allergens an email is sent to me that lets me know to research to see if none of your allergens are present in the food. A new table has been added to the database to track our research results and improve our messaging for foods that have been checked.

We want to help people with food allergies in their research of foods to find if a food is safe for them. Any ideas for improvements to the food allergy checker would be welcome comments. Currently as a start up we are not experiencing high volume of usage of the food allergy checker so some of the features like the Report tab of the checker really are not quite yet helping as much as they could if the crowd sourcing concept took off. (The idea behind the Report tab is that if a food is known to contain an allergen that is not listed in the ingredients on the labelling of the food our customers can add the allergen. This would make fewer false negatives by including the research our customers as a group are doing in their daily usage of the checker.)

As always thanks for reading our post and may your day be blessed!

Tagged --no tags--
Posted by Michael Horvath under Technology  SQL Server  Test Automation  on Dec 07 2020

Today we added a new link to our Complete Person Records page that will allow you to download the records that are displayed on the page in form of a .csv file that you can use in your tests. This .csv file is updated hourly at 38 minutes after the top of the hour so that any records you add to the table by generating new records will be available shortly after the update (00:38, 01:38, 02:38 ... 23:38).



Thanks for reading this post and for downloading data from our site to use in your tests!

Tagged --no tags--
Posted by Michael Horvath under Technology  PRESS News  on Sep 13 2020

PRESS makes use of Selenium web drivers for the various browsers supported by login/ password change automation. We found that for the Edge browser Microsoft is continually making updates that require a new web driver that is matched to the Edge browser version. Because we want to be able to support any customer using our password manager and don't know what version of Edge may be installed on their system we came up with a solution that minimizes need for adding all the versions of the Edge web driver and automatically selecting the correct one based upon the version of Edge on their PC.

Our solution allows the current release of PRESS to work on any version of web driver by giving a user interface that will allow the user to select the correct version of web driver matched to their browser version. This "hot swap" feature works by making an API call to get the list of drivers available for download from our server and will swap the driver the user chooses for the one that is installed already. The user interface is found on the About screen and will show the user which version is currently installed and to change the driver the user can pick from a dropdown list the correct version. (If you cannot find the version matched to your browser feel free to contact our tech support to have the version you need added to our server.)

The "hot swap" feature will allow support of future updates without the need to build a new PRESS setup package. This saves effort on our part in creating and maintaining PRESS setup packages. We only have to make a table entry for any new web drivers and add the driver to our server so that it may be downloaded and swapped in place of the default driver that comes with the PRESS setup package.

Thanks for reading this post!

Tagged --no tags--
Posted by Michael Horvath under Technology  PRESS News  on Jul 07 2020

Our password manager PRESS can provide IT staff members an automated system to generate, store and change passwords that are used in their IT shop's solutions. For example we have a feature that will update web.config files with password changes automatically. The current version of PRESS requires that an IT staff member develop a macro to perform that task, but it is fairly easy to do. The password generator will allow you to control what characters and symbols are used when randomly generating the password and you can generate long passwords for improved security.

We have plans for future version of PRESS that will automatically update passwords using a change password macro when a password expires according to the password aging value you select. This will further improve security.

Give PRESS a try today for free and for a fee you can activate this software to unlock the fully functional version.

Thanks for reading our post and have a blessed day!

Tagged --no tags--
Posted by Michael Horvath under Technology  .Net MVC  on Apr 10 2020

Our main site includes a Buy page that allows our customers to purchase activation keys for the Windows Desktop applications they've downloaded from our site. This Buy page was originally fragmented in design that is there were more than one forms on the view page. These were causing a headache with keeping the data on the different forms persisting when interacting on the other forms. A friend of mine gave me advice that I should make these separate forms into one form and use different actions in my controller for the page to handle the various control inputs like button clicks, etc. It turned out to be great advice. This page now works great with none of the strange quirks that I had spent quite a bit of time trying to eliminate.

I have included the source code from my view page here to show how the view is implemented. The controller code is much like any controller code for a view and is not included in this post, but should anyone have any questions about that feel free to contact me. Here is a snippet from one of the controller actions though that show how this action is decorated to make the view work with the controller action.

...
        [HttpPost]
        [ValidateAntiForgeryToken]
        [MultipleButton(Name = "action", Argument = "BuySearch")]
        public ActionResult BuySearch([Bind(Include = "ID,Price")] tblPRESSInventory tblPRESSInventory, string sortOrder, string currentFilter, string searchString, string clearSearch, int? page, string currentEmail, string customerID, int productID = 1)
        {
            ViewBag.CurrentSort = sortOrder;
            ViewBag.ProductID = productID;
            ViewBag.CurrentProductID = productID.ToString();
            ViewBag.CustomerID = customerID;

            bool alreadyPaid = false;

            var tempProduct = db2.tblPRESSInventories.Find(productID);
 ...
            return View(items.ToPagedList(pageNumber, pageSize));
        }
 ...

Also needed to make the MultipleButton decoration work is this class definition.

...
    [AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = true)]
    public class MultipleButtonAttribute : ActionNameSelectorAttribute
    {
        public string Name { get; set; }
        public string Argument { get; set; }

        public override bool IsValidName(ControllerContext controllerContext, string actionName, MethodInfo methodInfo)
        {
            var isValidName = false;
            var keyValue = string.Format("{0}:{1}", Name, Argument);
            var value = controllerContext.Controller.ValueProvider.GetValue(keyValue);

            if (value != null)
            {
                controllerContext.Controller.ControllerContext.RouteData.Values[Name] = Argument;
                isValidName = true;
            }

            return isValidName;
        }
    }
...
    

Here's the view code, note that this is used as a partial view in a couple of other views so that code does not have to duplicate the page. Those views correspond to the actions like the example above the BuySearch action. Anyway here's the complete view code. Note that the file extension was changed to add a .txt to end of filename so that you can download this file. Not sure how to grant permission for you to download the file with its correct file extension.

Buy.cshtml

The last touch on the view page is the paged list pager controls displayed below the table of inventory items. This makes use of the PagedListRenderOptions to make the links in the pager control trigger post to the controller. That turned out to be fairly straightforward to implement once I knew where to look for help.

...
            @Html.PagedListPager(Model, page => Url.Action("Buy",
    new { page }), new PagedListRenderOptions { FunctionToTransformEachPageLink = (liTag, aTag) => { aTag.Attributes.Remove("href"); aTag.Attributes.Add("href", "javascript:void(0);"); aTag.Attributes.Add("onclick","updatePage('" + aTag.InnerHtml + "'," + Model.PageCount + ");"); liTag.InnerHtml = aTag.ToString(); return liTag; } })
...

I hope this helps someone who is having similar problems in implementing a form with multiple buttons that need post event handlers.

Thanks for reading and have a blessed day!

Tagged MVC Views 

<< Previous Page
Next Page >>