public Boolean GrabarxitemDB(com_GenerOCompraDet_Info GO, com_ordencompra_local_det_Info OC, ref string msg)
 {
     try
     {
         using (EntitiesCompras context = new EntitiesCompras())
         {
             var address = new com_GenerOCompra_Det_x_com_ordencompra_local_det_CusCider();
             address.goc_IdEmpresa     = GO.IdEmpresa;
             address.goc_IdDetTrans    = GO.IdDetTrans;
             address.goc_IdTransaccion = GO.IdTransaccion;
             address.oc_IdEmpresa      = OC.IdEmpresa;
             address.oc_IdSucursal     = OC.IdSucursal;
             address.oc_IdOrdenCompra  = OC.IdOrdenCompra;
             address.oc_Secuencia      = OC.Secuencia;
             context.com_GenerOCompra_Det_x_com_ordencompra_local_det_CusCider.Add(address);
             context.SaveChanges();
             msg = "Se ha procedido a grabar el registro exitosamente.";
         }
         return(true);
     }
     catch (Exception ex)
     {
         string arreglo = ToString();
         tb_sis_Log_Error_Vzen_Data oDataLog      = new tb_sis_Log_Error_Vzen_Data();
         tb_sis_Log_Error_Vzen_Info Log_Error_sis = new tb_sis_Log_Error_Vzen_Info(ex.ToString(), "", arreglo, "",
                                                                                   "", "", "", "", DateTime.Now);
         oDataLog.Guardar_Log_Error(Log_Error_sis, ref mensaje);
         mensaje = ex.InnerException + " " + ex.Message;
         msg     = ex.ToString();
         throw new Exception(ex.ToString());
     }
 }
 public Boolean GrabarxitemDB(com_GenerOCompraDet_Info GO, com_ordencompra_local_det_Info OC, ref string msg)
 {
     try
     {
         return(data.GrabarxitemDB(GO, OC, ref msg));
     }
     catch (Exception ex)
     {
         Core.Erp.Info.Log_Exception.LoggingManager.Logger.Log(Core.Erp.Info.Log_Exception.LoggingCategory.Error, ex.Message);
         throw new Core.Erp.Info.Log_Exception.DalException(string.Format("", "GrabarxitemDB", ex.Message), ex)
               {
                   EntityType = typeof(com_GenerOCompra_Det_x_com_ordencompra_local_det_CusCider_Bus)
               };
     }
 }