private void cargardatos()
        {
            terminal OTerminal = new terminal();

            OTerminal.Numeroterm    = txtnumero.Text;
            OTerminal.SerialImp     = txtserialimp.Text;
            OTerminal.Imei1         = txtimei1.Text;
            OTerminal.Imei2         = txtimei2.Text;
            OTerminal.IdEstadoterm  = Convert.ToInt32(ddlestado.SelectedValue);
            OTerminal.Id_Uso        = Convert.ToInt32(ddluso.SelectedValue);
            OTerminal.TtObservacion = txtobs.Text;
            OTerminal.FechaIni      = DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss");
            OTerminal.Zonat         = txtzona.Text;

            try
            {
                if (OTerminal.Ingresaterminal())
                {
                    lblcorrecto.Text = "Terminal Ingresada con Éxito";
                }
                else
                {
                    lblcorrecto.Text = "Error en el ingreso  " + OTerminal.Error;
                }
            }
            catch
            {
                lblcorrecto.Text = OTerminal.Error;
            }
        }
Пример #2
0
        public Terminal add(Terminal t)
        {
            terminal te = new terminal();

            te.event_id             = t.event_id;
            te.location_id          = t.location_id;
            te.online               = true;
            te.template_id          = t.template_id;
            te.title                = t.title;
            te.last_online          = DateTime.Now;
            te.deck                 = t.deck;
            te.rotate               = t.rotate;
            te.group_by_location    = t.group_by_location;
            te.group_by_start       = t.group_by_start;
            te.all_sessions         = t.all_sessions;
            te.template_id_announce = t.template_id_announce;
            te.template_id_end      = t.template_id_end;
            te.notified             = false;
            te.notified_date        = new DateTime?();

            db.terminals.InsertOnSubmit(te);

            db.SubmitChanges();

            t.id = te.id;

            return(t);
        }
Пример #3
0
        public void getPrinterConfig()
        {
            using (var db = new Model.posdbEntities())
            {
                var printertype = (from p in db.terminals
                                   where p.TerminalName == AppConfig.MacAddress
                                   select new { PrinterType = p.PrinterType }).SingleOrDefault();

                if (printertype != null)
                {
                    AppConfig.PrinterType = printertype.PrinterType.ToString();
                    if (AppConfig.PrinterType == "80")
                    {
                        mmPaperToolStripMenuItem.Checked  = true;
                        mmPaperToolStripMenuItem1.Checked = false;
                    }
                    else if (AppConfig.PrinterType == "60")
                    {
                        mmPaperToolStripMenuItem.Checked  = false;
                        mmPaperToolStripMenuItem1.Checked = true;
                    }
                }
                else
                {
                    terminal ter = new terminal();
                    ter.StoreID           = 1;
                    ter.TerminalName      = AppConfig.MacAddress;
                    ter.PrinterType       = 80;
                    AppConfig.PrinterType = "80".ToString();
                    db.terminals.Add(ter);
                    db.SaveChanges();
                }
            }
        }
Пример #4
0
        public bool notify(int id)
        {
            terminal terminal = this.db.terminals.Single <terminal>((Expression <Func <terminal, bool> >)(x => x.id == id));

            terminal.notified      = true;
            terminal.notified_date = new DateTime?(DateTime.Now);
            this.db.SubmitChanges();
            return(true);
        }
Пример #5
0
        public Boolean offline(Int32 id)
        {
            terminal t = db.terminals.Single(x => x.id == id);

            t.online = false;

            db.SubmitChanges();

            return(true);
        }
Пример #6
0
        public Boolean delete(Int32 id)
        {
            terminal t = db.terminals.Single(x => x.id == id);

            db.terminals.DeleteOnSubmit(t);

            db.SubmitChanges();

            return(true);
        }
Пример #7
0
        public bool online(int id)
        {
            terminal terminal = this.db.terminals.Single <terminal>((Expression <Func <terminal, bool> >)(x => x.id == id));

            terminal.online        = true;
            terminal.last_online   = DateTime.Now;
            terminal.notified      = false;
            terminal.notified_date = new DateTime?();
            this.db.SubmitChanges();
            return(true);
        }
        private void consultartodasterminales(GridView gvterminales)
        {
            terminal OTerminal = new terminal();



            if (OTerminal.ConsultarTerminales())
            {
                // DataTable Listado = OTerminal.ListadoTerminales;
                DataTable Listado = OTerminal.ListadoTerminales;
                gvterminales.DataSource = Listado.DataSet;
                gvterminales.DataBind();
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            solicitud OSolicitud = new solicitud();
            terminal  OTerminal  = new terminal();
            string    valida     = (string)(Session["Nomcrea"]);

            if (valida != null)
            {
                if (!this.IsPostBack)
                {
                    CargarMaestros(ddlestado, 5);
                    CargarMaestros(ddluso, 6);

                    consultartodasterminales(gvconsultartodastermi);
                    divsecun.Visible = false;
                }
            }
        }
Пример #10
0
        public static EditUserViewModel ParaDominioModeloEdite(List <TerminaisUsuario> registro)
        {
            var listaTerminaisUsuario = new List <terminal>();

            foreach (var item in registro)
            {
                var terminal = new terminal()
                {
                    agente = item.Agente, numeroTerminal = item.NumeroTerminal
                };
                listaTerminaisUsuario.Add(terminal);
            }
            var terminaisUsuario = new EditUserViewModel()
            {
                TerminaisUsuario = listaTerminaisUsuario
            };

            return(terminaisUsuario);
        }
Пример #11
0
        public Terminal update(Terminal t)
        {
            terminal te = db.terminals.Single(x => x.id == t.id);

            te.event_id             = t.event_id;
            te.location_id          = t.location_id;
            te.online               = t.online;
            te.template_id          = t.template_id;
            te.title                = t.title;
            te.rotate               = t.rotate;
            te.deck                 = t.deck;
            te.template_id_announce = t.template_id_announce;
            te.template_id_end      = t.template_id_end;
            te.group_by_location    = t.group_by_location;
            te.group_by_start       = t.group_by_start;
            te.all_sessions         = t.all_sessions;
            te.notified             = t.notified;
            te.notified_date        = t.notified_date;

            db.SubmitChanges();

            return(t);
        }
Пример #12
0
 public ParentInfo(List <Protein> proteins, terminal parentType, string seqFound)
 {
     this.theoreticalProteins = proteins;
     this.parentType          = parentType;
     this.fragFound           = seqFound;
 }
Пример #13
0
 void Start()
 {
     associatedTerminal = gameObject.transform.parent.gameObject.GetComponent <terminal>();
 }