コード例 #1
0
        public string UpdateData(string moduleid, string data)
        {
            data = data.Replace(""", "\"").Replace("&sqbleft;", "[").Replace("&sqbright;", "]").Replace("&crbleft;", "{").Replace("&crbright;", "}");
            EvolutilityModuleDB dbObject = new EvolutilityModuleDB();

            dbObject.EvolitityAdvedUpdateModelData(Convert.ToInt32(moduleid), data);
            return("Updated");
        }
コード例 #2
0
        /// <summary>
        /// Get model settings from Database
        /// </summary>
        public void getModelSettings()
        {
            EvolutilityModuleDB evolSettings = new EvolutilityModuleDB();
            SqlDataReader       reader       = evolSettings.EvolutilityAdvGetModelSettings(Convert.ToInt32(Request.QueryString["moduleid"]));

            if (reader.Read())
            {
                this.ModelID        = reader["ModelID"].ToString();
                this.ModelLabel     = reader["ModelLabel"].ToString();
                this.ModelEntity    = reader["ModelEntity"].ToString();
                this.ModelEntities  = reader["ModelEntities"].ToString();
                this.ModelLeadField = reader["ModelLeadField"].ToString();
                this.ModelElements  = reader["ModelElements"].ToString();
            }
            reader.Close();
        }
コード例 #3
0
        /// <summary>
        /// The UpdateBtn_Click event handler on this Page is used to save
        ///   the text changes to the database.
        /// </summary>
        /// <param name="e">
        /// The <see cref="System.EventArgs"/> instance containing the event data.
        /// </param>
        protected override void OnUpdate(EventArgs e)
        {
            base.OnUpdate(e);
            EvolutilityModuleDB evolSettings = new EvolutilityModuleDB();

            evolSettings.EvolutilityAdvUpdateModelSettings(Convert.ToInt32(Request.QueryString["mid"]), txtModelID.Text, txtModelLabel.Text, txtEntity.Text, txtEntities.Text, txtLeadFields.Text, txtElements.Text);

            if (Request.QueryString.GetValues("ModalChangeMaster") != null)
            {
                Response.Write("<script type=\"text/javascript\">window.parent.location = window.parent.location.href;</script>");
            }
            else
            {
                this.RedirectBackToReferringPage();
            }
        }
コード例 #4
0
        /// <summary>
        /// The Page_Load even on this page is used to get Model Settings
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e">That contains Event </param>
        protected void Page_Load(object sender, EventArgs e)
        {
            EvolutilityModuleDB evolSettings = new EvolutilityModuleDB();
            SqlDataReader       reader       = evolSettings.EvolutilityAdvGetModelSettings(Convert.ToInt32(Request.QueryString["mid"]));

            if (reader.Read())
            {
                txtModelID.Text    = reader["ModelID"].ToString();
                txtModelLabel.Text = reader["ModelLabel"].ToString();
                txtEntity.Text     = reader["ModelEntity"].ToString();
                txtEntities.Text   = reader["ModelEntities"].ToString();
                txtLeadFields.Text = reader["ModelLeadField"].ToString();
                txtElements.Text   = reader["ModelElements"].ToString();
            }
            reader.Close();
        }
コード例 #5
0
        public string SelectAllData(string moduleid)
        {
            string data = "[]";
            EvolutilityModuleDB dbObject = new EvolutilityModuleDB();
            var sqlreader = dbObject.EvolitityAdvedGetModelData(Convert.ToInt32(moduleid));

            if (sqlreader.Read())
            {
                data = sqlreader["ModelData"].ToString();
            }
            //Added by Ashish - Connection Pool Issue
            if (sqlreader != null)
            {
                sqlreader.Close();
            }
            return(data);
        }
コード例 #6
0
        /// <summary>
        /// Handles the Load event of the Page control.
        /// </summary>
        /// <param name="sender">
        /// The source of the event.
        /// </param>
        /// <param name="e">
        /// The <see cref="System.EventArgs"/> instance containing the event data.
        /// </param>
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (this.Settings.ContainsKey("DataConnection") && this.Settings["DataConnection"].Value != null && !string.IsNullOrEmpty(this.Settings["DataConnection"].Value.ToString()))
                {
                    this.evoModuleRenderer.SqlConnection = this.Settings["DataConnection"].Value.ToString();
                }

                if (this.Settings.ContainsKey("Evol.Disco.Connection") && this.Settings["Evol.Disco.Connection"].Value != null && !string.IsNullOrEmpty(this.Settings["Evol.Disco.Connection"].Value.ToString()))
                {
                    this.evoModuleRenderer.SqlConnectionDico = this.Settings["Evol.Disco.Connection"].Value.ToString();
                }

                if (this.Settings.ContainsKey("Modules") && this.Settings["Modules"].Value != null && !string.IsNullOrEmpty(this.Settings["Modules"].Value.ToString()))
                {
                    var evelModuleId = new EvolutilityModuleDB().GetEvolutilyModuleID(this.evoModuleRenderer.SqlConnection, this.Settings["Modules"].Value.ToString());
                    this.evoModuleRenderer.XMLfile = evelModuleId.ToString();
                }
            }
            catch { }
        }