Exemplo n.º 1
0
 public static string Olustur(GorevEvent param)
 {
     return(Sql.GetInstance().Get("sp_gorev_olustur", new List <object> {
         param.refKullanici,
         Convert.ToDateTime(param.start),
         Convert.ToDateTime(param.end),
         param.GorevAd,
         param.refDurum,
         param.Not
     }, (row) =>
     {
         return row.GetString("Result");
     }));
 }
Exemplo n.º 2
0
        public static GorevYoneticisi Listesi()
        {
            GorevYoneticisi gorevYoneticisi = new GorevYoneticisi();

            Sql.GetInstance().Set("sp_gorev_listesi", null, (ds) =>
            {
                if (ds.Tables.Count <= 0)
                {
                    return;
                }

                if (ds.Tables[0].Rows.Count <= 0)
                {
                    return;
                }

                gorevYoneticisi.Resource = new List <GorevResource>();
                gorevYoneticisi.Event    = new List <GorevEvent>();

                if (ds.Tables.Count > 0)
                {
                    foreach (DataRow row in ds.Tables[0].Rows)
                    {
                        gorevYoneticisi.Resource.Add(GorevResource.Parse(row));
                    }
                }

                if (ds.Tables.Count > 1)
                {
                    foreach (DataRow row in ds.Tables[1].Rows)
                    {
                        gorevYoneticisi.Event.Add(GorevEvent.Parse(row));
                    }
                }

                Sql.ResetInstance();
            });

            return(gorevYoneticisi);
        }
Exemplo n.º 3
0
        public static GorevEvent Detay(int Id)
        {
            GorevEvent detay = new GorevEvent();

            Sql.GetInstance().Set("sp_gorev_detay", new List <object> {
                Id
            }, (ds) =>
            {
                if (ds.Tables.Count <= 0)
                {
                    return;
                }

                if (ds.Tables[0].Rows.Count <= 0)
                {
                    return;
                }

                detay = Parse(ds.Tables[0].Rows[0]);
            });

            return(detay);
        }