public static void Create(ENTREGA_MATERIAL entrg_mat_new)
 {
     using (BODEXDataContext ctx = new BODEXDataContext())
     {
         ctx.ListaEntregaMaterial.InsertOnSubmit(entrg_mat_new);
         ctx.SubmitChanges();
     }
 }
        public static void Delete(ENTREGA_MATERIAL entrg_mat_del)
        {
            using (BODEXDataContext ctx = new BODEXDataContext())
            {
                ENTREGA_MATERIAL borrar = (from entrg_mat in ctx.ListaEntregaMaterial
                                           where entrg_mat.EM_ID.Equals(entrg_mat_del.EM_ID)
                                           select entrg_mat).First<ENTREGA_MATERIAL>();

                ctx.ListaEntregaMaterial.DeleteOnSubmit(borrar);
                ctx.SubmitChanges();
            }
        }
        public static void Update(ENTREGA_MATERIAL entrg_mat_upd)
        {
            using (BODEXDataContext ctx = new BODEXDataContext())
            {
                ENTREGA_MATERIAL entrega_material = (from entrg_mat in ctx.ListaEntregaMaterial
                                                     where entrg_mat.EM_ID.Equals(entrg_mat.EM_ID)
                                                     select entrg_mat).First<ENTREGA_MATERIAL>();

                entrega_material.SM_ID                  = entrg_mat_upd.SM_ID;
                //entrega_material.UN_ID                  = entrg_mat_upd.UN_ID;
                entrega_material.EM_ENCARGADO_ENTREGA   = entrg_mat_upd.EM_ENCARGADO_ENTREGA;
                entrega_material.EM_FECHA               = entrg_mat_upd.EM_FECHA;

                ctx.SubmitChanges();
            }
        }
示例#4
0
 partial void DeleteENTREGA_MATERIAL(ENTREGA_MATERIAL instance);
示例#5
0
 partial void UpdateENTREGA_MATERIAL(ENTREGA_MATERIAL instance);
示例#6
0
 partial void InsertENTREGA_MATERIAL(ENTREGA_MATERIAL instance);