Пример #1
0
 private void load_data()
 {
     if (_codigo != 0)   // && _parte != 0
     {
         PD.SV_SYSTEM              DefSistema = P.Consultas.sistema.Default();
         ACode.Vperiodo            periodo    = new ACode.Vperiodo(Today.Year, Today.Month);
         DateTime                  desde      = DateTime.MinValue;
         DateTime                  hasta      = DateTime.MaxValue;
         List <PD.DETAIL_MOVEMENT> resultado  = P.Consultas.listar_cambios(DefSistema, periodo, _codigo, _parte, desde, hasta, null, null);
         if (resultado.Count > 0)
         {
             cod_art.Text   = _codigo.ToString();
             Tarticulo.Text = resultado[0].desc_breve;
         }
         else
         {
             empty_fields();
         }
         detalle.SetObjects(resultado);
     }
     else
     {
         empty_fields();
     }
 }
Пример #2
0
        public void set_sheet_format(int TotalColumns, PD.SV_SYSTEM sistema, Vperiodo WorkPeriodo, string Titulo, string nom_pag)
        {
            _oSheet.Range[_oSheet.Cells[1, 1], _oSheet.Cells[1, TotalColumns]].EntireColumn.AutoFit();
            string   Mostrar, periodo, Titulo1, Titulo2;
            DateTime fecha_cm;

            Titulo1 = sistema.ENVIORMENT.name;
            Titulo2 = "(" + sistema.CURRENCY.code + ")";

            fecha_cm = WorkPeriodo.last;
            Mostrar  = Titulo + WorkPeriodo.lastDB.Substring(0, 4) + " " + Titulo2 + "\r";
            periodo  = fecha_cm.ToString("MMMM yyyy");
            //pies = ""

            _oSheet.Name = nom_pag;
            //oSheet.Application.ScreenUpdating = false;
            //oSheet.Application.Calculation = Exc.XlCalculation.xlCalculationManual;

            var ps = _oSheet.PageSetup;

            ps.LeftHeaderPicture.Filename = Auxiliar.fileLogo;

            //ps.PrintTitleRows = "$1:$2"
            ps.Orientation = Exc.XlPageOrientation.xlLandscape;
            //ps.BlackAndWhite = False
            ps.Zoom = 80;
            //ps.FitToPagesWide = 1;
            //ps.FitToPagesTall = 1;
            try
            {
                ps.PaperSize = Exc.XlPaperSize.xlPaperFolio;
            }
            catch
            {
                try
                {
                    ps.PaperSize = Exc.XlPaperSize.xlPaperLetter;
                }
                catch
                {
                    //solo pasar el error, buscar un manejo mas correcto para este caso
                }
            }

            ps.LeftHeader   = "&G";
            ps.CenterHeader = Mostrar;
            ps.RightHeader  = periodo;
            ps.LeftFooter   = Auxiliar.getUser() + "\r" + "&P / &N";
            //ps.CenterFooter = pies;
            ps.RightFooter        = "Fecha de Impresion : &D" + "\r" + "Hora de Impresion: &T";
            ps.TopMargin          = _oSheet.Application.InchesToPoints(1.01);
            ps.CenterHorizontally = true;
        }
Пример #3
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }
            //if (obj.GetType() == typeof(string))
            //    return (this == (string)obj);

            if (this.GetType() != obj.GetType())
            {
                return(false);
            }

            SV_SYSTEM p = (SV_SYSTEM)obj;

            return(this.id == p.id);
        }
Пример #4
0
 public static PD.RespuestaAccion MODIF_PURCHASE_PARAM(int cabecera, PD.SV_SYSTEM sistema, PD.SV_PARAMETER parametro, decimal valor, bool withResiduo = false)
 {
     using (var cServ = new ServiceProcess.ServiceAFN2())
         return(cServ.Repo.MODIF_PURCHASE_PARAM(cabecera, sistema, parametro, valor, withResiduo));
 }
Пример #5
0
 public static PD.RespuestaAccion REGISTER_PURCHASE_PARAM(int cabecera, PD.SV_SYSTEM sistema, PD.SV_PARAMETER parametro, decimal valor)
 {
     using (var cServ = new ServiceProcess.ServiceAFN2())
         return(cServ.Repo.REGISTER_PURCHASE_PARAM(cabecera, sistema, parametro, valor));
 }
Пример #6
0
 public static List <PD.SV_TRANSACTION_DETAIL> GetByHeadsSystem(int[] head_ids, PD.SV_SYSTEM system)
 {
     using (var cServ = new ServiceProcess.ServiceAFN2())
         return(cServ.Repo.detalles.GetByHeadsSystem(head_ids, system));
 }
Пример #7
0
 public static PD.RespuestaAccion MODIF_PURCHASE_DETAIL(int TrxHeadId, PD.SV_SYSTEM OSystem, bool depreciar, bool con_credito)
 {
     using (var cServ = new ServiceProcess.ServiceAFN2())
         return(cServ.Repo.MODIF_PURCHASE_DETAIL(TrxHeadId, OSystem, depreciar, con_credito));
 }
Пример #8
0
 public static PD.RespuestaAccion REGISTER_PURCHASE_DETAIL(PD.GENERIC_VALUE cabecera, PD.SV_SYSTEM OSystem, bool depreciar, bool con_credito)
 {
     using (var cServ = new ServiceProcess.ServiceAFN2())
         return(cServ.Repo.REGISTER_PURCHASE_DETAIL(cabecera, OSystem, depreciar, con_credito));
 }
Пример #9
0
 public static List <PD.DETAIL_MOVEMENT> listar_cambios(PD.SV_SYSTEM Vsistema, ACode.Vperiodo periodo, int BatchId, int PartIndex, DateTime desde, DateTime hasta, PD.SV_KIND[] Vclases, PD.SV_ZONE[] Vzonas)
 {
     using (var cServ = new ServiceProcess.ServiceAFN2())
         return(cServ.Proceso.changed_movimiento(Vsistema, periodo, BatchId, PartIndex, desde, hasta, Vclases, Vzonas));
 }