Ejemplo n.º 1
0
        public Szerk(MdTermekek termekek)
        {
            rs            = new RktServ();
            this.termekek = termekek;
            InitializeComponent();

            button1.DialogResult = DialogResult.OK;

            NameHolder.setText(termekek.getTNev());

            PriceHolder.setText(termekek.getTar().ToString());

            AmmountHolder.setText(termekek.getTkeszl().ToString());

            UnitHolder.setText(termekek.getMert());

            CodeHolder.setText(termekek.getTkatkod().ToString());


            VonCodeHolder.setText(termekek.getTvonkod().ToString());
            dateTimePicker1.Value = termekek.getSzavido();



            bool eg = false;

            if (termekek.getTegalizalte() == true)
            {
                eg = true;
                checkBox1.CheckState = CheckState.Checked;
            }
        }
Ejemplo n.º 2
0
        unsafe static void Main(string[] args)
        {
            CodeInfo   info   = new CodeInfo(ArchInfo.Id.kIdX86);
            CodeHolder holder = new CodeHolder();

            holder.Initialize(info);
            Assembler asm = new Assembler(holder);
            Label     l1  = asm.NewLabel();
            var       err = asm.jmp(l1);

            asm.mov(RegsDef.eax, 20);
            asm.Bind(l1);
            Console.WriteLine("ErrorCode:{0}", err);
            Console.WriteLine("Code Length:{0}", holder.Sections[0].Buffer.Size);
            byte *b = holder.Sections[0].Buffer.Data;

            for (int i = 0; i < holder.Sections[0].Buffer.Size; i++)
            {
                Console.Write("{0:X2} ", *(b + i));
            }
            asm.Dispose();            //equivalent to delete;
            holder.Dispose();
            info.Dispose();
        }
Ejemplo n.º 3
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (_Sid == rs.getLastId())
            {
                return;
            }

            /*
             *     NameHolder.Text = termekek.getTNev();
             *
             *  PriceHolder.Text = termekek.getTar().ToString();
             *
             *
             *     AmmountHolder.Text = termekek.getTkeszl().ToString();
             *
             *
             *     UnitHolder.Text = termekek.getMert();
             *
             *
             *
             *     CodeHolder.Text = termekek.getTkatkod().ToString();
             *
             *
             *     VonCodeHolder.Text = termekek.getTvonkod().ToString();
             */

            id = termekek.getTkod();
            termekek.setTnev(NameHolder.Text);
            if (PriceHolder.onlyNumber())
            {
                termekek.setTar(Convert.ToInt32(PriceHolder.Text));
            }
            else
            {
            }
            if (AmmountHolder.onlyNumber())
            {
                termekek.setTkeszl(Convert.ToInt32(AmmountHolder.Text));
            }
            else
            {
                //errorprovider
            }
            if (CodeHolder.onlyNumber())
            {
                termekek.setTkatkod(Convert.ToInt32(CodeHolder.Text));
            }
            else
            {
                //errorprovider
            }

            if (VonCodeHolder.onlyNumber())
            {
                termekek.setTvonkod(Convert.ToInt32(VonCodeHolder.Text));
            }
            else
            {
            }
            if (checkBox1.Checked)
            {
                termekek.setTegaliz(true);
            }
            else
            {
                termekek.setTegaliz(false);
            }
            termekek.setTSzavido(dateTimePicker1.Value);



            this.Close();
        }
Ejemplo n.º 4
0
 public Status Get(int seconds, int? id)
 {
     var obj = new CodeHolder(seconds.ToTimeSpanSeconds());
     return obj.SyncData(id.GetValueOrDefault(0));
 }
Ejemplo n.º 5
0
        public async Task <Status> Get(int seconds, int?id)
        {
            var obj = new CodeHolder(seconds.ToTimeSpanSeconds());

            return(await obj.AsyncData(id.GetValueOrDefault(0)));
        }