Esempio n. 1
0
        void dList(DataTable dt)
        {
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                bal.Recipes c = new bal.Recipes();
                c.recipeid   = Int32.Parse(dt.Rows[i]["catid"].ToString());
                c.recipename = dt.Rows[i]["recipename"].ToString();
                c.recipedesc = dt.Rows[i]["recipedesc"].ToString();
                c.price      = Int32.Parse(dt.Rows[i]["price"].ToString());
                //c.catid = Int32.Parse(dt.Rows[i]["catid"].ToString());
                c.image = dt.Rows[i]["image"].ToString();

                c.category.catid        = Int32.Parse(dt.Rows[i]["catid"].ToString());
                c.category.categoryname = dt.Rows[i]["categoryname"].ToString();

                Commentdb combdb = new Commentdb();
                c.commentList = combdb.getbyrecipe(c.recipeid);

                cList.Add(c);
            }
        }
Esempio n. 2
0
 public List <Comments> get()
 {
     dal.Commentdb obj = new dal.Commentdb();
     return(obj.get(this));
 }
Esempio n. 3
0
 public int remove()
 {
     dal.Commentdb obj = new dal.Commentdb();
     return(obj.remove(this));
 }
Esempio n. 4
0
 public List <Comments> list()
 {
     dal.Commentdb obj = new dal.Commentdb();
     return(obj.list());
 }
Esempio n. 5
0
 public int save()
 {
     dal.Commentdb obj = new dal.Commentdb();
     return(obj.save(this));
 }