Exemplo n.º 1
0
        public static dynamic UpdateStatus(Banners dto)
        {
            DataTable tabl = ConnectDb.ExecuteDataTableTask(Startup.ConnectionString, "SP_Banners",
                                                            new string[] { "@flag", "@Id", "@Status", "@ModifiedBy" },
                                                            new object[] { "UpdateStatus", dto.Id, dto.Status, dto.ModifiedBy });

            return((from r in tabl.AsEnumerable()
                    select new
            {
                N = (int)(r["N"]),
            }).FirstOrDefault());
        }
Exemplo n.º 2
0
        public static dynamic SaveItem(Banners dto)
        {
            DataTable tabl = ConnectDb.ExecuteDataTableTask(Startup.ConnectionString, "SP_Banners",
                                                            new string[] { "@flag", "@Id", "@Title", "@Description", "@Status", "@CreatedBy", "@ModifiedBy", "@Link", "@SortOrder", "@CatId", "@Target", "@Image", "@IdCoQuan" },
                                                            new object[] { "SaveItem", dto.Id, dto.Title, dto.Description, dto.Status, dto.CreatedBy, dto.ModifiedBy, dto.Link, dto.SortOrder, dto.CatId, dto.Target, dto.Image, dto.IdCoQuan });

            return((from r in tabl.AsEnumerable()
                    select new
            {
                N = (int)(r["N"]),
            }).FirstOrDefault());
        }