public static void Create(DETALLE_DEVOLUCION_MATERIAL d_d_m_new)
 {
     using (BODEXDataContext ctx = new BODEXDataContext())
     {
         ctx.ListaDevolucionMaterialDetalle.InsertOnSubmit(d_d_m_new);
         ctx.SubmitChanges();
     }
 }
        public static void Delete(DETALLE_DEVOLUCION_MATERIAL d_d_m_del)
        {
            using (BODEXDataContext ctx = new BODEXDataContext())
            {
                DETALLE_DEVOLUCION_MATERIAL borrar = (from d_d_m in ctx.ListaDevolucionMaterialDetalle
                                                      where (d_d_m.M_ID.Equals(d_d_m_del.M_ID) && d_d_m.DM_ID.Equals(d_d_m_del.DM_ID))
                                                      select d_d_m).First<DETALLE_DEVOLUCION_MATERIAL>();

                ctx.ListaDevolucionMaterialDetalle.DeleteOnSubmit(borrar);
                ctx.SubmitChanges();
            }
        }
        public static void Update(DETALLE_DEVOLUCION_MATERIAL d_d_m_upd)
        {
            using (BODEXDataContext ctx = new BODEXDataContext())
            {
                DETALLE_DEVOLUCION_MATERIAL DevolucionMaterialDetalle = (from d_d_m in ctx.ListaDevolucionMaterialDetalle
                                                        where (d_d_m.DM_ID.Equals(d_d_m_upd.DM_ID) && d_d_m.M_ID.Equals(d_d_m_upd.M_ID))
                                                        select d_d_m).First<DETALLE_DEVOLUCION_MATERIAL>();

                DevolucionMaterialDetalle.DDM_MOTIVO = d_d_m_upd.DDM_MOTIVO;
                DevolucionMaterialDetalle.DDM_CANTIDAD = d_d_m_upd.DDM_CANTIDAD;

                ctx.SubmitChanges();
            }
        }
示例#4
0
 partial void DeleteDETALLE_DEVOLUCION_MATERIAL(DETALLE_DEVOLUCION_MATERIAL instance);
示例#5
0
 partial void InsertDETALLE_DEVOLUCION_MATERIAL(DETALLE_DEVOLUCION_MATERIAL instance);