Thursday, August 30, 2012

Popup to be shown Every 5 minutes

Popup to be shown Every 5 minutes

Hi

 

I have a child windows which needs to be shown every 5 minutes

How can i achieve this task. Should i use Threading ? Pls note I dont want to use Notification Window as the requirement is to be displayed in a Childwindow

 

Answers & Comments...

Answer: 1

GaneshGdrBlr

I have a child windows which needs to be shown every 5 minutes

Make use of DispatcherTimer, in tick event open the childwindow and close it in close event.

http://amjadsilverlight.wordpress.com/2011/09/27/how-to-use-dispatchertimer-in-silverlight/

http://www.java2s.com/Code/Silverlight/Data/EventDispatcherTimer.htm

http://msdn.microsoft.com/en-us/library/cc189084(v=vs.95).aspx





receiving diffent list from domain

receiving diffent list from domain

ı have a business  project . ı use entity framework. ı have a method in domainservice which receive company names

when ı was load information with loadoperation<tEntity>

for example ı have two rows informaiton in domain   method .rows diffent,but in to code side entity have two rows but rows are same

ı cant find why??

code side-----

ctx.Load(ctx.GetifrmgridQuery(prno)).Completed += (re, fg) =>

{
List<ihtiyacfirmaPOCO> lfirma = new List<ihtiyacfirmaPOCO>();

LoadOperation<ifrmPOCO> rslt = re as LoadOperation<ifrmPOCO>;

ihtiyacfirmagrid.ItemsSource = rslt.Entities.ToList();

var itm = ihtiyacfirmagrid.ItemsSource;

ihtiyacfirmagrid.ItemsSource =null;

ihtiyacfirmagrid.ItemsSource = itm;

};

domain side---

[Query]
public IQueryable<ifrmPOCO> Getifrmgrid(intprno)

{
List<ifrmPOCO> flist = new List<ifrmPOCO>();
List<ihtiyacfirma2POCO> flist2 = new List<ihtiyacfirma2POCO>();List<ihtiyacfirma2POCO> flist3 = new List<ihtiyacfirma2POCO>();

flist = (from q in ObjectContext.STN_ProfilFirma

where q.PF_PNo == prno

select new ifrmPOCO{

IF_FKod1 = q.PF_FirmaKodu,

}).ToList();

foreach (ifrmPOCO itemf in flist)

{
string frm = Convert.ToString(itemf.IF_FKod1);

flist2 = (from a in ObjectContext.STN_MUHANASQL
where a.MUH_KOD == frm
select new ihtiyacfirma2POCO{

IF_FirmaAdi = a.MUH_ADI,

}).ToList();

flist.Where(w => w.IF_FKod1 == itemf.IF_FKod1).First().IF_FirmaAdi = flist2.First().IF_FirmaAdi.ToString();
}

return

flist.AsQueryable();

}

 

Answers & Comments...