Click here to Skip to main content
15,920,005 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to know current environment is under the design environment or running environment? Pin
Luc Pattyn26-Apr-09 17:16
sitebuilderLuc Pattyn26-Apr-09 17:16 
GeneralRe: How to know current environment is under the design environment or running environment? Pin
mctramp16826-Apr-09 17:59
mctramp16826-Apr-09 17:59 
GeneralRe: How to know current environment is under the design environment or running environment? Pin
Luc Pattyn27-Apr-09 0:33
sitebuilderLuc Pattyn27-Apr-09 0:33 
QuestionHow to show the maximized window completely? Pin
garry.fang26-Apr-09 14:21
garry.fang26-Apr-09 14:21 
AnswerRe: How to show the maximized window completely? Pin
SayreCC26-Apr-09 15:04
SayreCC26-Apr-09 15:04 
AnswerRe: How to show the maximized window completely? Pin
garry.fang26-Apr-09 15:55
garry.fang26-Apr-09 15:55 
QuestionAdding The Data To The TextBoxes That Returned From SqlQuary Pin
emrah198226-Apr-09 14:09
emrah198226-Apr-09 14:09 
QuestionDynamically load collection manager with an object in different namespace Pin
GarrotGake26-Apr-09 11:23
GarrotGake26-Apr-09 11:23 
Based on the code below, how do I dynamically create a Gake.Orchard.Business.PageContent object in the Gake.Data.Base.DataCollection.Retrieve method?

Below is "working" code; however, I don't think I should be explicitly passing in "typeof(typePageContent)", in order to get it to work. I believe I should be able to get that from "typDataObject". The syntax that I'd like to use, is commented out; however, the line "typDataObject typObj = new typDataObject();" created Gake.Orchard.Data.PageContent, when I need it to create Gake.Orchard.Business.PageContent.

public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        PageContentCollection pcc = new PageContentCollection(2,this.GetType().Name);  
        //...
    }
}

namespace Gake.Orchard.Business
{
    public class PageContentCollection : Gake.Orchard.Data.PageContentCollection<pagecontent>
    {
	//...
    }
}

namespace Gake.Orchard.Data
{
    public abstract class PageContentCollection<typpagecontent> : Gake.Data.Base.DataCollection<pagecontent> where typPageContent : PageContent
    {
        public PageContentCollection(int Panel, string Page)
        {
            //DataResult result = base.Retrieve("Panel = @1 and Page = @2", Panel, Page);
            DataResult result = base.Retrieve(typeof(typPageContent), "Panel = @1 and Page = @2", Panel, Page);
		//...
        }
    }
}

namespace Gake.Data.Base
{
    public abstract class DataCollection<typdataobject> : CollectionBase where typDataObject : DataObject//, new()
    {
        //public DataResult Retrieve(string Conditions, params object[] Values)
        public DataResult Retrieve(Type TypeOfChild, string Conditions, params object[] Values)
        {
		//...
		//typDataObject typObj = new typDataObject(); 
		Object objChild = Activator.CreateInstance(TypeOfChild);
		//...
        }
    }
}</typdataobject></pagecontent></typpagecontent></pagecontent>

QuestionHide or make my peocess invisible in task manager? Pin
sbscb26-Apr-09 11:18
sbscb26-Apr-09 11:18 
AnswerRe: Hide or make my peocess invisible in task manager? Pin
Saksida Bojan26-Apr-09 11:27
Saksida Bojan26-Apr-09 11:27 
AnswerRe: Hide or make my peocess invisible in task manager? Pin
Christian Graus26-Apr-09 13:10
protectorChristian Graus26-Apr-09 13:10 
GeneralRe: Hide or make my peocess invisible in task manager? Pin
sbscb26-Apr-09 13:37
sbscb26-Apr-09 13:37 
GeneralRe: Hide or make my peocess invisible in task manager? Pin
Christian Graus26-Apr-09 14:03
protectorChristian Graus26-Apr-09 14:03 
GeneralRe: Hide or make my peocess invisible in task manager? Pin
sbscb26-Apr-09 14:35
sbscb26-Apr-09 14:35 
GeneralRe: Hide or make my peocess invisible in task manager? Pin
Dave Kreskowiak26-Apr-09 19:23
mveDave Kreskowiak26-Apr-09 19:23 
GeneralRe: Hide or make my peocess invisible in task manager? Pin
22over728-Apr-09 12:45
22over728-Apr-09 12:45 
GeneralRe: Hide or make my peocess invisible in task manager? Pin
Darki6995-Feb-11 14:03
Darki6995-Feb-11 14:03 
QuestionHashsets and objects... Pin
daviiie26-Apr-09 10:07
daviiie26-Apr-09 10:07 
AnswerRe: Hashsets and objects... Pin
Luc Pattyn26-Apr-09 10:41
sitebuilderLuc Pattyn26-Apr-09 10:41 
GeneralRe: Hashsets and objects... Pin
daviiie26-Apr-09 10:55
daviiie26-Apr-09 10:55 
GeneralRe: Hashsets and objects.. Pin
Luc Pattyn26-Apr-09 11:14
sitebuilderLuc Pattyn26-Apr-09 11:14 
QuestionSelected ListViewItem Pin
Saksida Bojan26-Apr-09 9:06
Saksida Bojan26-Apr-09 9:06 
AnswerRe: Selected ListViewItem Pin
Roberto Ho26-Apr-09 13:18
Roberto Ho26-Apr-09 13:18 
GeneralRe: Selected ListViewItem Pin
Saksida Bojan26-Apr-09 21:36
Saksida Bojan26-Apr-09 21:36 
QuestionSave data Pin
Star0926-Apr-09 7:59
Star0926-Apr-09 7:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.