Exemple #1
0
        public static GridRow BindGridData(SupervisorRequest source, bool isSupervisorRequest)
        {
            var row = new GridRow {
                IdentityValue = source.Id
            };

            row.AddCell(Enum.GetName(typeof(RequestStatusEnum), source.LatestRequestStatus));
            row.AddCell(source.Title);
            row.AddCell(Enum.GetName(typeof(RequsetPriorityEnum), source.Priority));
            row.AddCell(source.Isolator.Abbriviation);
            //row.AddCell(source.RequestType.Type);
            if (isSupervisorRequest)
            {
                row.AddActionIcon("fa fa-search text-Primary", "Click to view detail");
                if (!source.LatestRequestStatus.Equals(RequestStatusEnum.Declined))
                {
                    row.AddActionIcon("fa fa-check text-success", "Click to approve request");
                    row.AddActionIcon("fa fa-times text-danger", "Click to decline request");
                }
            }
            else if (!source.LatestRequestStatus.Equals(RequestStatusEnum.Approved))
            {
                row.AddActionIcon("fa fa-edit text-Primary", "Click to edit request");
                row.AddActionIcon("fa fa-trash text-danger", "Click to delete request");
            }

            //row.AddActionIcon("fa fa-users text-primary", "Click to manage staff allocation", "/isolators/isolatorstaffallocationindex?isoid=" + source.IsolatorId + "&nm=" + source.Abbriviation + "");

            return(row);
        }
        public static GridRow BindVtmGridData(Vtm source)
        {
            var row = new GridRow {
                IdentityValue = source.VtmId
            };

            row.AddCell(source.DrugName);
            row.AddCell(source.DmdRoute.Route);
            row.AddCell(source.DmdSupplier.SupplierName);
            row.AddCell(source.BrandName);
            if (source.IsLicensed)
            {
                row.AddCell("Yes");
            }
            else
            {
                row.AddCell("No", cellCss: "text-danger");
            }

            if (source.IsLicensed)
            {
                row.AddActionIcon("fa fa-ban text-danger", "Licensed proudct can not be modified");
                return(row);
            }

            row.AddActionIcon("fa fa-edit text-success", "Click to view/edit");
            row.AddActionIcon("fa fa-trash text-danger", "Click to remove this item");
            return(row);
        }
Exemple #3
0
        public static GridRow BindGridData(Site source)
        {
            var row = new GridRow {
                IdentityValue = source.Id
            };

            row.AddCell(source.Name);
            row.AddActionIcon("fa fa-edit text-success", "Click to view/edit");
            row.AddActionIcon("fa fa-trash text-danger", "Click to delete");
            return(row);
        }
        public static GridRow BindGridData(Group source)
        {
            var row = new GridRow {
                IdentityValue = source.Id
            };

            row.AddCell(source.Name);
            row.AddActionIcon("fa fa-edit text-success", "Click to view/edit");
            row.AddActionIcon("fa fa-trash text-danger", "Click to delete");
            row.AddActionIcon("fa fa-cog text-info managePermission", "Assign Permissions", "/PermissionGroup/ManagePermission/" + source.Id);
            return(row);
        }
        public static GridRow BindGridData(PackagePlan source)
        {
            var row = new GridRow {
                IdentityValue = source.Id
            };

            row.AddCell(source.PackageName);
            row.AddCell(source.Duration);
            row.AddCell(source.Price.ToString("#,##0.00"));
            row.AddActionIcon("fa fa-edit text-success", "Click to view/edit");
            row.AddActionIcon("fa fa-trash text-danger", "Click to delete");
            return(row);
        }
Exemple #6
0
        public static GridRow BindGridData(Loan source)
        {
            var row = new GridRow {
                IdentityValue = source.Id
            };

            row.AddCell(source.Name);
            row.AddCell(source.Customer?.Name);
            row.AddActionIcon("fa fa-upload text-info", "Click Upload documents");
            row.AddActionIcon("fa fa-edit text-success", "Click to view/edit");
            row.AddActionIcon("fa fa-trash text-danger", "Click to delete");
            row.AddActionIcon("fa fa-file-pdf-o text-danger", "Click to download application");
            return(row);
        }
        public static GridRow BindProcedureGridData(IsolatorProcedure source)
        {
            var row = new GridRow
            {
                IdentityValue = source.IsolatorProcedureId,
            };

            row.AddCell(source.Description);
            row.AddCell(((IsolatorProcedureTypeEnum)source.ProcedureTypeId).ToString());

            row.AddActionIcon("fa fa-edit text-success", "Click to view/edit");
            row.AddActionIcon("fa fa-trash text-danger", "Click to delete");

            return(row);
        }
        public static GridRow BindShiftGridData(IsolatorShift source)
        {
            var row = new GridRow
            {
                IdentityValue = source.ShiftId,
            };

            row.AddCell(source.ShiftTitle);
            row.AddCell(source.StartTime);
            row.AddCell(source.EndTime);

            row.AddActionIcon("fa fa-edit text-success", "Click to view/edit");
            row.AddActionIcon("fa fa-trash text-danger", "Click to delete");

            return(row);
        }
        public static GridRow BindGridData(Customer source)
        {
            var row = new GridRow {
                IdentityValue = source.Id
            };

            row.AddCell(source.Name);
            row.AddCell(source.District);
            row.AddCell(source.Town);
            row.AddCell(source.Loans?.Count().ToString());
            row.AddActionIcon("fa fa-eye text-success", "Click to View loans");
            row.AddActionIcon("fa fa-upload text-info", "Click Upload documents");
            row.AddActionIcon("fa fa-edit text-success", "Click to view/edit");
            row.AddActionIcon("fa fa-trash text-danger", "Click to delete");
            return(row);
        }
        public static GridRow BindGridData(BusinessDetails source)
        {
            var row = new GridRow {
                IdentityValue = source.Id
            };

            row.AddCell(source.BusinessName);
            row.AddCell(source.ContactPerson);
            row.AddCell(source.ContactEmail);
            row.AddCell(source.ContactPhone);
            row.AddCell(source.City);
            row.AddCell(source.Postcode);
            row.AddActionIcon("fa fa-edit text-success", "Click to view/edit");
            row.AddActionIcon("fa fa-trash text-danger", "Click to delete");
            row.AddActionIcon("fa fa-cog text-info", "Click to add/update business user");
            return(row);
        }
        public static GridRow BindUsedProdGridData(UsedProduct source)
        {
            var row = new GridRow {
                IdentityValue = source.UsedProductId
            };

            row.AddCell(source.Vtm.DrugName);
            row.AddCell(string.Format("{0} {1}", source.DoseAmountSize, source.DoseMeasurementUnit));

            var stock = source.Stocks.FirstOrDefault();

            row.AddCell(string.Format("{0} {1}", stock == null? 0 : stock.DoseAmountSizeAvailable, source.DoseMeasurementUnit));
            row.AddCell(stock == null? "N/A" : stock.StorageLocation.LocationName);

            row.AddActionIcon("fa fa-edit text-success", "Click to view/edit");
            row.AddActionIcon("fa fa-trash text-danger", "Click to remove this item");
            return(row);
        }
Exemple #12
0
        public static GridRow BindRoleGridData(RoleViewModel source)
        {
            var row = new GridRow {
                IdentityValue = source.TempId
            };

            row.AddCell(source.Name);
            row.AddActionIcon("fa fa-cog text-info managePermission", "Manage Permission", "/User/ManagePermission/" + source.TempId);
            return(row);
        }
        public static GridRow BindGridData(IntegrationOrder source)
        {
            var row = new GridRow {
                IdentityValue = source.Id
            };

            row.AddCell(source.Name);
            row.AddCell(source.AllocatedIsolatorId.ToString());
            row.AddCell(source.BookedInDate == null ? "" : ((DateTime)source.BookedInDate).ToString("dd/MM/yyyy"));
            row.AddCell(((OrderProgressEnum)source.OrderLastProgressId).ToString());
            //row.AddCell(source.ExternalBarcode);
            //row.AddCell(source.ExternalOrderId);
            row.AddCell(source.RequiredDate == null ? "" : ((DateTime)source.RequiredDate).ToString("dd/MM/yyyy"));
            row.AddCell(source.ScheduledDate == null ? "" : ((DateTime)source.ScheduledDate).ToString("dd/MM/yyyy"));

            row.AddActionIcon("fa fa-edit text-success", "Click to view/edit");
            row.AddActionIcon("fa fa-info-circle text-success compareVersion", "Compare version");

            //if(!source.IntegrationOrderProgress.Name.Contains("Decline", StringComparison.OrdinalIgnoreCase))
            if (source.OrderLastProgressId == null)
            {
                row.AddActionIcon("fa fa-check text-success", "Click to authorize request");
                row.AddActionIcon("fa fa-times text-danger", "Click to decline request");
                row.AddActionIcon("fa fa-commenting-o text-default", "Click to call for supervisor");
                row.AddActionIcon("fa fa-object-group text-default", "Click to classify order");
            }
            return(row);
        }
Exemple #14
0
        public static GridRow BindGridData(UserViewModel source, bool isTrustAdmin)
        {
            var row = new GridRow {
                IdentityValue = source.TempId
            };

            row.AddCell(source.Email);
            row.AddCell(source.FirstName);
            row.AddCell(source.Surname);
            row.AddCell(source.MobileNumber);
            row.AddActionIcon("fa fa-edit text-success", "Click to view/edit");
            row.AddActionIcon("fa fa-trash text-danger", "Click to delete");
            //if (isPharmixAdmin)
            //    row.AddActionIcon("fa fa-cog text-info manageModules", "Manage Modules", "/User/ManageModule/"+source.TempId);
            //else
            if (isTrustAdmin)
            {
                row.AddActionIcon("fa fa-user-secret changePassword", "Click to change password");
                row.AddActionIcon("fa fa-cog text-info manageRoles", "Manage Roles", "/User/ManageUserRole/" + source.TempId);
            }
            return(row);
        }
Exemple #15
0
        public static GridRow BindGridData(Patient source)
        {
            var row = new GridRow {
                IdentityValue = source.Id
            };

            row.AddCell(source.FirstName);
            row.AddCell(source.Surname);
            row.AddCell(source.EmailAddress);
            row.AddCell(source.MobileNumber);
            row.AddCell(source.DateOfBirth == null ? "" : ((DateTime)source.DateOfBirth).ToString("dd/MM/yyyy"));

            row.AddActionIcon("fa fa-file-text text-success", "Click to view/edit");

            return(row);
        }
Exemple #16
0
        public static GridRow BindGridData(Patient source)
        {
            var row = new GridRow {
                IdentityValue = source.Id
            };

            row.AddCell(source.FirstName);
            row.AddCell(source.Surname);
            row.AddCell(source.DateOfBirth == null ? "N/A" : source.DateOfBirth.Value.ToString("dd/MM/yyyy"));
            row.AddCell(source.Gender == null ? "N/A" : source.Gender.Name);
            row.AddCell(source.EmailAddress);
            row.AddCell(source.MobileNumber);
            row.AddCell(source.NhsNumber);
            row.AddCell(source.PasNumber);

            row.AddActionIcon("fa fa-pencil-square text-priamry", "View/edit", "/patient/detail?patientid=" + source.Id + "");

            return(row);
        }