Пример #1
0
 bool ICaixa_e.Add(ISuprimento_e entidade)
 {
     if (entidade != null)
     {
         var tempSuprimento = this.vSuprimento;
         this.vSuprimento = decimal.Add(this.vSuprimento, entidade.Valor);
         if (this.vSuprimento.CompareTo(tempSuprimento) > 0)
         {
             string format = "total anterio{0} novo total{1}, diferenca acrecentada{2}";
             Noticia.Add(string.Format(format, tempSuprimento, vSuprimento, entidade.Valor));
             suprimento_s.Add((Suprimento_e)entidade);
             return(true);
         }
         else
         {
             Noticia.Add("valor adicopnado nao acrenta em nada");
             return(false);
         }
     }
     else
     {
         Noticia.Add("Entidade  nula");
         return(false);
     }
 }
Пример #2
0
        bool ISuprimento.Print_Document(ISuprimento_e suprimento_, out PrintDocument document)
        {
            if (suprimento_ != null)
            {
                _E       = suprimento_;
                document = new PrintDocument();
                PageSettings settings = new PageSettings();
                Graphics     graphics = document.PrinterSettings.CreateMeasurementGraphics();

                settings.PaperSize           = CalcArePrint(graphics: ref graphics);
                document.DefaultPageSettings = settings;

                document.PrintPage += new PrintPageEventHandler(PrintPage_Suprimento);
                return(true);
            }
            else
            {
                document = null;
                Noticia.Add("Erro Suprimento_c Print_Document valor suprimento_ nullo");
                return(false);
            }
        }
Пример #3
0
 bool ICaixa.Suprimento_Novo(ICaixa_e entidade, out ISuprimento_e suprimento_)
 {
     if (entidade != null)
     {
         if (Hope_static.Autenticacao.Autenticado)
         {
             suprimento_ = new Suprimento_e(caixaID: entidade.Get_ID, colaborador: Hope_static.Autenticacao.Colaborador.ToSerilazion());
             return(true);
         }
         else
         {
             Noticia.Add("Nao esta autenticado para essa acao ");
             suprimento_ = null;
             return(false);
         }
     }
     else
     {
         Noticia.Add("Suprimento entidade nullo");
         suprimento_ = null;
         return(false);
     }
 }
Пример #4
0
 bool ISuprimento.Select(object current, out ISuprimento_e suprimento_)
 {
     throw new NotImplementedException();
 }