Beispiel #1
0
        public Af_TipoTransac_x_Cta_CbteCble_Info Get_Info_Transac_x_CtaCble(int IdEmpresa, decimal IdTipoTran, string IdCatalogo)
        {
            try
            {
                Af_TipoTransac_x_Cta_CbteCble_Info info = new Af_TipoTransac_x_Cta_CbteCble_Info();
                using (EntitiesActivoFijo listado = new EntitiesActivoFijo())
                {
                    var select = from q in listado.Af_TipoTransac_x_Cta_CbteCble
                                 where q.IdEmpresa == IdEmpresa &&
                                 q.IdTipTransActivoFijo == IdTipoTran && q.IdCatalogo == IdCatalogo
                                 select q;

                    foreach (var item in select)
                    {
                        info.IdEmpresa            = item.IdEmpresa;
                        info.IdTipTransActivoFijo = item.IdTipTransActivoFijo;
                        info.IdCatalogo           = item.IdCatalogo;
                        info.ct_IdEmpresa         = item.ct_IdEmpresa;
                        info.ct_IdCbteCble        = item.ct_IdCbteCble;
                        info.ct_IdTipoCbte        = item.ct_IdTipoCbte;
                    }
                }
                return(info);
            }
            catch (Exception ex)
            {
                string arreglo = ToString();
                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());
            }
        }
Beispiel #2
0
        public Boolean GuardarTran_x_CbteCble(Af_TipoTransac_x_Cta_CbteCble_Info InfoTran_x_Cta, ref string msjError)
        {
            try
            {
                using (EntitiesActivoFijo Context = new EntitiesActivoFijo())
                {
                    var Address = new Af_TipoTransac_x_Cta_CbteCble();
                    Address.IdEmpresa            = InfoTran_x_Cta.IdEmpresa;
                    Address.IdTipTransActivoFijo = InfoTran_x_Cta.IdTipTransActivoFijo;
                    Address.IdCatalogo           = InfoTran_x_Cta.IdCatalogo;
                    Address.ct_IdEmpresa         = InfoTran_x_Cta.ct_IdEmpresa;
                    Address.ct_IdCbteCble        = InfoTran_x_Cta.ct_IdCbteCble;
                    Address.ct_IdTipoCbte        = InfoTran_x_Cta.ct_IdTipoCbte;

                    Context.Af_TipoTransac_x_Cta_CbteCble.Add(Address);
                    Context.SaveChanges();
                }
                return(true);
            }
            catch (Exception ex)
            {
                string arreglo = ToString();
                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());
            }
        }
Beispiel #3
0
 public void cargarGridContable()
 {
     try
     {
         infoDepreCble = new Af_TipoTransac_x_Cta_CbteCble_Info();
         infoDepreCble = busDepreCtaCble.Get_Info_Transac_x_CtaCble(param.IdEmpresa, Convert.ToDecimal(txtIdmejora.Text), Cl_Enumeradores.eTipoActivoFijo.Mejo_Acti.ToString());
         IdCbteCle     = infoDepreCble.ct_IdCbteCble;
         ucCon_GridDiarioContable.setInfo(infoDepreCble.ct_IdEmpresa, infoDepreCble.ct_IdTipoCbte, infoDepreCble.ct_IdCbteCble);
     }
     catch (Exception ex)
     {
         Log_Error_bus.Log_Error(ex.ToString());
         MessageBox.Show(ex.ToString(), param.Nombre_sistema, MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
 public Boolean GuardarTran_x_CbteCble(Af_TipoTransac_x_Cta_CbteCble_Info InfoTran_x_Cta, ref string msjError)
 {
     try
     {
         return(dataTran.GuardarTran_x_CbteCble(InfoTran_x_Cta, ref msjError));
     }
     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("", "GuardarTran_x_CbteCble", ex.Message), ex)
               {
                   EntityType = typeof(Af_TipoTransac_x_Cta_CbteCble_Bus)
               };
     }
 }
 private Af_TipoTransac_x_Cta_CbteCble_Info Get_Info_TipoTran_x_CtaCble(Af_Mej_Baj_Activo_Info InfoAf, ct_Cbtecble_Info CbteCbleInfo)
 {
     try
     {
         Af_TipoTransac_x_Cta_CbteCble_Info infoTranCtaCble = new Af_TipoTransac_x_Cta_CbteCble_Info();
         infoTranCtaCble.IdEmpresa            = InfoAf.IdEmpresa;
         infoTranCtaCble.IdTipTransActivoFijo = InfoAf.Id_Mejora_Baja_Activo;
         infoTranCtaCble.IdCatalogo           = InfoAf.Id_Tipo;
         infoTranCtaCble.ct_IdEmpresa         = CbteCbleInfo.IdEmpresa;
         infoTranCtaCble.ct_IdCbteCble        = CbteCbleInfo.IdCbteCble;
         infoTranCtaCble.ct_IdTipoCbte        = CbteCbleInfo.IdTipoCbte;
         return(infoTranCtaCble);
     }
     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("", "getTipoTran_x_CtaCble", ex.Message), ex)
               {
                   EntityType = typeof(Af_Mej_Baj_Activo_Bus)
               };
     }
 }