using (WinCEsDataContext context = new WinCEsDataContext())
{
context.Log = Console.Out;
var q = from i in context.TenderResults select i;
ultraGrid1.DisplayLayout.MaxBandDepth = 1;
ultraGrid1.DataSource=q;
}
If you don't set to 1 your application will hang. cause it will try to create new band to all it childs
Selasa, 29 Januari 2008
Infragistic UltraGrid
hmm.. i've just used this grid
and i've test it, that if i drag many objects to DBML
say many relation on each other.
and then when i use linq to give me result and i just simply
bind it to this grid. it hangs.
If just one or two table related to each other than works fine.
It won't hang on ordinary datagridview
Gee what explaination for this
and i've test it, that if i drag many objects to DBML
say many relation on each other.
and then when i use linq to give me result and i just simply
bind it to this grid. it hangs.
If just one or two table related to each other than works fine.
It won't hang on ordinary datagridview
Gee what explaination for this
Jumat, 25 Januari 2008
Indonesia Economic Growth
What is wrong?
well, they always says things got better, our growth is 6.3 percent.
next year will be 6.8%
....
And then Boom
everything's expensive,Disaster.
Gee what is wrong with you?
Do you always make a false alarm to your people?
the growth doesn't lift people's life
and you always hide your proverty statistic
Making some Advertisement on TV,
like promoting your bad work?????
Let's save the energy bla bla bla
while you know that the growth of electricity , but you don't grow your electricity plant.
Every of your department going for advertisement but yeah, hell yeah what is new ?
There are so many hole, cause of this Crisis.Other country has go out from crisis, but why can't we? we are dealing with numerous problem in 2008
and how can you answer it?
well, they always says things got better, our growth is 6.3 percent.
next year will be 6.8%
....
And then Boom
everything's expensive,Disaster.
Gee what is wrong with you?
Do you always make a false alarm to your people?
the growth doesn't lift people's life
and you always hide your proverty statistic
Making some Advertisement on TV,
like promoting your bad work?????
Let's save the energy bla bla bla
while you know that the growth of electricity , but you don't grow your electricity plant.
Every of your department going for advertisement but yeah, hell yeah what is new ?
There are so many hole, cause of this Crisis.Other country has go out from crisis, but why can't we? we are dealing with numerous problem in 2008
and how can you answer it?
Indonesia Criticsm
Hmm, i'm Indonesian Chinesse.
What i see from this country. is a lamb ass.
Not foward going person, open minded people for Changes to a better future.
Problems and problems:
Corruption,
Proverty,
Unemployement,
Traffic Jam,
EU banned over Air Flight,
poor Birocracy,
Bad Economic Growth,
Wealthy natural resource but being handled and taken by foreigner,
Not growing farming,
Not growing biofuel,
Not growing Busway,
Now it's the daily needs that rise again,
Soya Beans, Rice, Minyak Tanah,Eggs,Flour=> PEOPLE are dying , don't you have any pitty on them???
SO everything that This Nation Government do is SLEEPPING
taking salary, sit, and go home and do nothing.
It awakes when everything gone bad, and that like some kind of Surprise or Shock like From sleeping and suddenly awake,"What to do , what to do, how to handle this?".
But never see to the future if this problem happens, what should we do from now.
It suck's THERE is just NEVER , NEVER they -> Government of Indonesia that Makes JUST ONE , i mean ONE RIGHT policy which is WORKING and make people life's better.
WHo do you put on the top position/head of your Government Department?????
A sleeping as worker??
What i see from this country. is a lamb ass.
Not foward going person, open minded people for Changes to a better future.
Problems and problems:
Corruption,
Proverty,
Unemployement,
Traffic Jam,
EU banned over Air Flight,
poor Birocracy,
Bad Economic Growth,
Wealthy natural resource but being handled and taken by foreigner,
Not growing farming,
Not growing biofuel,
Not growing Busway,
Now it's the daily needs that rise again,
Soya Beans, Rice, Minyak Tanah,Eggs,Flour=> PEOPLE are dying , don't you have any pitty on them???
SO everything that This Nation Government do is SLEEPPING
taking salary, sit, and go home and do nothing.
It awakes when everything gone bad, and that like some kind of Surprise or Shock like From sleeping and suddenly awake,"What to do , what to do, how to handle this?".
But never see to the future if this problem happens, what should we do from now.
It suck's THERE is just NEVER , NEVER they -> Government of Indonesia that Makes JUST ONE , i mean ONE RIGHT policy which is WORKING and make people life's better.
WHo do you put on the top position/head of your Government Department?????
A sleeping as worker??
UltraToolBarManager,UltraDataSource
Now this is something .
Excel 2007 Like
Very Neat
Ribbon etc....
Coool
HOw to access and change property
1.Sharedprop
2.Instanceprop
can find it just cast down
TextBoxTool tooltmp = (TextBoxTool)ultraToolbarsManager1.Tools["TxtFormula"];
tooltmp.ToolKeyPress += new ToolKeyPressEventHandler(tooltmp_ToolKeyPress);
UltraDatasource How to
------------------------
Ultradatasource1.Setcount(int)=>this fire the ultradatasouce Cell data requested
Bind each of that to Your object Collection property
Excel 2007 Like
Very Neat
Ribbon etc....
Coool
HOw to access and change property
1.Sharedprop
2.Instanceprop
can find it just cast down
TextBoxTool tooltmp = (TextBoxTool)ultraToolbarsManager1.Tools["TxtFormula"];
tooltmp.ToolKeyPress += new ToolKeyPressEventHandler(tooltmp_ToolKeyPress);
UltraDatasource How to
------------------------
Ultradatasource1.Setcount(int)=>this fire the ultradatasouce Cell data requested
Bind each of that to Your object Collection property
Kamis, 24 Januari 2008
LinQ Insert, Update
First to Insert just
Create New object of your mapping
ex: class MyuserList
string username;
int age;
MyuserList a=new MyuserList();
a.username="cipto";
a.age="26";
or Dynamicinsert(a);
Mydatacontext tmp=new Mydatacontext();
tmp.insertonsubmit(a);
For Update
-------------------
just get the recod and change the properti and then
submitchanges();=>everything is update to DB
Create New object of your mapping
ex: class MyuserList
string username;
int age;
MyuserList a=new MyuserList();
a.username="cipto";
a.age="26";
or Dynamicinsert(a);
Mydatacontext tmp=new Mydatacontext();
tmp.insertonsubmit(a);
For Update
-------------------
just get the recod and change the properti and then
submitchanges();=>everything is update to DB
LinQ Example
How To Get End result as List
-------------------------------
public IList GetAllEntity()
{
var r = (from s in Manager.Context.CalculationFormula select s.Code).ToList();
return r;
}
How to Get just One Row Result
----------------------------------
public CalculationFormula GetbyCode(string code)
{
var r = (from s in Manager.Context.CalculationFormula
where s.Code==code
select s).Single();
return r;
}
How to Order the Result
-----------------------
return Entity.GetByJobiD(ID).OrderBy(s=>s.RowIndex).ToList();
How to Lazy loading
----------------------
I assume the meaning is, because on each object we have one to many relation ship you can told linq to hold/postpone the loading of these related data by setting it's differedloading=false;
How to get datatable
----------------------
unfortunately you have to have your datatable as source first, there's no way of returning as datatable, so from datatable source you can Query it again againts it. and return as a new datatalbe result using linq.datasetextension.dll the method name is , .CopyasDatatable() or .CopyasDataView()
HOw to join to several tables, join, etc,
-----------------------------------------
Now linq can get very complex, and hierrachiall(does this spell right?)
but it's your job to find out.
-------------------------------
public IList
{
var r = (from s in Manager.Context.CalculationFormula select s.Code).ToList();
return r;
}
How to Get just One Row Result
----------------------------------
public CalculationFormula GetbyCode(string code)
{
var r = (from s in Manager.Context.CalculationFormula
where s.Code==code
select s).Single();
return r;
}
How to Order the Result
-----------------------
return Entity.GetByJobiD(ID).OrderBy(s=>s.RowIndex).ToList();
How to Lazy loading
----------------------
I assume the meaning is, because on each object we have one to many relation ship you can told linq to hold/postpone the loading of these related data by setting it's differedloading=false;
How to get datatable
----------------------
unfortunately you have to have your datatable as source first, there's no way of returning as datatable, so from datatable source you can Query it again againts it. and return as a new datatalbe result using linq.datasetextension.dll the method name is , .CopyasDatatable() or .CopyasDataView()
HOw to join to several tables, join, etc,
-----------------------------------------
Now linq can get very complex, and hierrachiall(does this spell right?)
but it's your job to find out.
Langganan:
Postingan (Atom)