Пример #1
0
 public Boolean GuardarDB(cxc_cobro_det_x_ct_cbtecble_det_Info info)
 {
     try
     {
         return(oData.GuardarDB(info));
     }
     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("", "Get_Info_cobro_x_ct_cbtecble", ex.Message), ex)
               {
                   EntityType = typeof(cxc_cobro_x_ct_cbtecble_Bus)
               };
     }
 }
Пример #2
0
        public Boolean GuardarDB(cxc_cobro_det_x_ct_cbtecble_det_Info info)
        {
            try
            {
                using (EntitiesCuentas_x_Cobrar context = new EntitiesCuentas_x_Cobrar())
                {
                    var addressG = new cxc_cobro_det_x_ct_cbtecble_det();

                    addressG.IdEmpresa_cb  = info.IdEmpresa_cb;
                    addressG.IdSucursal_cb = info.IdSucursal_cb;
                    addressG.IdCobro_cb    = info.IdCobro_cb;
                    addressG.secuencial_cb = info.secuencial_cb;

                    addressG.IdEmpresa_ct  = info.IdEmpresa_ct;
                    addressG.IdTipoCbte_ct = info.IdTipoCbte_ct;
                    addressG.IdCbteCble_ct = info.IdCbteCble_ct;
                    addressG.secuencia_ct  = info.secuencia_ct;

                    addressG.secuencia_reg = info.secuencia_reg = GetId(info.IdEmpresa_cb, info.IdSucursal_cb, info.IdCobro_cb, info.secuencial_cb);
                    addressG.observacion   = info.observacion;



                    context.cxc_cobro_det_x_ct_cbtecble_det.Add(addressG);
                    context.SaveChanges();
                }
                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;
                throw new Exception(ex.InnerException.ToString());
            }
        }