Exemple #1
0
        public static dynamic SaveItem(DMPhuongXa dto)
        {
            DataTable tabl = ConnectDb.ExecuteDataTableTask(Startup.ConnectionString, "danhmuc_phuongxa",
                                                            new string[] { "@flag", "@Id", "@Ten", "@TrangThai", "@MoTa", "@Ma" },
                                                            new object[] { "SaveItem", dto.Id, dto.Ten, dto.TrangThai, dto.MoTa, dto.Ma });

            return((from r in tabl.AsEnumerable()
                    select new
            {
                N = (decimal)(r["N"]),
            }).FirstOrDefault());
        }
Exemple #2
0
        public static dynamic DeleteItem(DMPhuongXa dto)
        {
            DataTable tabl = ConnectDb.ExecuteDataTableTask(Startup.ConnectionString, "danhmuc_phuongxa",
                                                            new string[] { "@flag", "@Id", "@ModifiedBy" },
                                                            new object[] { "DeleteItem", dto.Id, dto.ModifiedBy });

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