Exemplo n.º 1
0
        public static dynamic SaveItem(DMLoaiCoQuan dto)
        {
            DataTable tabl = ConnectDb.ExecuteDataTableTask(Startup.ConnectionString, "DanhMuc_LoaiCoQuan",
                                                            new string[] { "@flag", "@Id", "@Title", "@Code", "@Description", "@Status", "@CreatedBy", "@ModifiedBy" },
                                                            new object[] { "SaveItem", dto.Id, dto.Title, dto.Code, dto.Description, dto.Status, dto.CreatedBy, dto.ModifiedBy });

            return((from r in tabl.AsEnumerable()
                    select new
            {
                N = (int)(r["N"]),
            }).FirstOrDefault());
        }
Exemplo n.º 2
0
        public static dynamic UpdateStatus(DMLoaiCoQuan dto)
        {
            DataTable tabl = ConnectDb.ExecuteDataTableTask(Startup.ConnectionString, "DanhMuc_LoaiCoQuan",
                                                            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());
        }