Ejemplo n.º 1
0
        /// <summary>
        /// User must have access to edit asset and be the one who created the record.
        /// </summary>
        /// <param name="o"></param>
        /// <returns>boolean value</returns>
        protected bool CanModified(object o)
        {
            bool   isAddedByMatchLogin = false;
            string addedbyemp          = ((DataRowView)o)["Added_By_Emp_ID"].ToString();

            if (!Utilities.isNull(addedbyemp))
            {
                isAddedByMatchLogin = addedbyemp.Equals(Utilities.GetEmployeeIdByLoggedOn(Utilities.GetLoggedOnUser()));
            }

            //User must have ability to edit the site asset and be the one that created the comment
            if (AppSecurity.Can_Edit_Site_Asset(QS_ASSET_ID) && isAddedByMatchLogin)
            {
                return(true);
            }

            return(false);
        }