Exemple #1
0
        public static dynamic SaveItem(DMChucVu dto)
        {
            DataTable tabl = ConnectDb.ExecuteDataTableTask(Startup.ConnectionString, "DanhMuc_ChucVu",
                                                            new string[] { "@flag", "@Id", "@Title", "@Status", "@Description", "@Leader", "@CreatedBy", "@ModifiedBy" },
                                                            new object[] { "SaveItem", dto.Id, dto.Title, dto.Status, dto.Description, dto.Leader, dto.CreatedBy, dto.ModifiedBy });

            return((from r in tabl.AsEnumerable()
                    select new
            {
                N = (int)(r["N"]),
            }).FirstOrDefault());
        }
Exemple #2
0
        public static dynamic DeleteItem(DMChucVu dto)
        {
            DataTable tabl = ConnectDb.ExecuteDataTableTask(Startup.ConnectionString, "DanhMuc_ChucVu",
                                                            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());
        }