Ejemplo n.º 1
0
        protected void Page_Load(object sender, System.EventArgs e)
        {
            //if (Request.QueryString["tableName"] != null && Request.QueryString["tableName"].ToString().Length > 0)
            //{
            //    _tableName = Request.QueryString["tableName"].ToString();
            //}

            // need both table name and primary key to activate plugin link
            //if( (_tableName != null && _tableName.Length > 0) && (PrimaryKeyValue != null && !PrimaryKeyValue.Equals("") )  && EnteredTimeValue.Length > 0  )
            if ((PrimaryKeyValue != null && !PrimaryKeyValue.Equals("")))
            {
                // Include groupId to identify file grouping
                string fileUploadPath         = "FileUploadForm.aspx?tableName=" + this.PrimaryKeyTable + "&primaryKey=" + this.PrimaryKeyValue;
                string resolvedFileUploadPath = ResolveUrl(fileUploadPath);
                string onClickScript          = "window.open('" + resolvedFileUploadPath + "','FileUploader', 'toolbars=no,resizable=yes,scrollbars=yes,width=900,height=800,left=20,top=20'); return false;";

                link.Attributes.Add("onclick", onClickScript);
                this.DisplayLink(this.PrimaryKeyTable, this.PrimaryKeyValue);
            }
            else
            {
                linkImage.ImageUrl = "~/Images/UploadFile.gif";
                link.Attributes.Add("onclick", "alert('Before uploading a file this form must saved and in an editable state.'); return false;");
            }
        }
Ejemplo n.º 2
0
        public bool Equals(Change other)
        {
            if (Object.ReferenceEquals(other, null))
            {
                return(false);
            }

            if (Object.ReferenceEquals(this, other))
            {
                return(true);
            }

            return(PrimaryKeyValue.Equals(other.PrimaryKeyValue) && _ChangeOperation.Equals(other._ChangeOperation));    //  TODO
        }