Example #1
0
        public History(ReaderVO reader)
        {
            InitializeComponent();
            label2.Text = reader.FIO;
            DBReference dbref = new DBReference();


            dataGridView1.DataSource = dbref.GetReaderHistory(reader);

            dataGridView1.Columns["DATE_ISSUE"].HeaderText  = "Дата выдачи";
            dataGridView1.Columns["DATE_RETURN"].HeaderText = "Дата возврата";
            dataGridView1.Columns["inv"].HeaderText         = "Инвентарный номер";
            dataGridView1.Columns["tit"].HeaderText         = "Заглавие";
            dataGridView1.Columns["avt"].HeaderText         = "Автор";
            dataGridView1.Columns["ID"].HeaderText          = "№№";
            dataGridView1.Columns["ID"].Width = 40;
            int i = 0;

            foreach (DataGridViewRow row in dataGridView1.Rows)
            {
                row.Cells["ID"].Value = (++i).ToString();
            }
            dataGridView1.Columns["tit"].Width = 300;
            dataGridView1.Columns["tit"].DefaultCellStyle.WrapMode = DataGridViewTriState.True;
        }
Example #2
0
 protected override void Start()
 {
     base.Start();
     dbRef            = Singleton.Instance <DBReference>();
     fieldReflection  = Singleton.Instance <FieldReflection>();
     OpenTaskBtn.IsOn = false;
 }
Example #3
0
        public void DBRefMapsToOtherDocumentsByOid()
        {
            var id = ObjectId.NewObjectId();

            using (var session = new Session())
            {
                session.Add(new Product { Id = id, Name = "RefProduct" });

                var productReference = new DBReference
                                           {
                                               Collection = MongoConfiguration.GetCollectionName(typeof(Product)),
                                               DatabaseName = "test",
                                               ID = id,
                                           };

                session.Add(new ProductReference
                                {
                                    Id = ObjectId.NewObjectId(),
                                    Name = "FullCart",
                                    ProductsOrdered = new[] { productReference }
                                });
            }

            var server = Mongo.ParseConnection("mongodb://localhost/NoRMTests");
            var reference = server.GetCollection<ProductReference>().Find().First();
            var product = reference.ProductsOrdered[0].Fetch(() => GetReferenceCollection());

            Assert.Equal(id.Value, product.Id.Value);
        }
Example #4
0
    private void Awake()
    {
        dbReference         = Singleton.Instance <DBReference>();
        fieldReflection     = Singleton.Instance <FieldReflection>();
        listenersController = Singleton.Instance <EventListenersController>();
        listenersController.AddEmiter("S_UPGRADE", S_UPGRADE);

        LevelUpBtn.OnClickEvents += OnLevelBtn;
    }
Example #5
0
    protected override void Start()
    {
        base.Start();

        dBReference         = Singleton.Instance <DBReference>();
        fieldReflection     = Singleton.Instance <FieldReflection>();
        listenersController = Singleton.Instance <EventListenersController>();

        listenersController.AddEmiter("S_TRAINING", S_TRAINING);
    }
Example #6
0
    protected override void Start()
    {
        base.Start();
        events.AddEmiter("S_DEPLOY", S_DEPLOY);
        //events.On("R_DEPLOY", R_DEPLOY);
        events.On("R_DEPLOY",
                  delegate(SocketIOEvent obj)
        {
            R_DEPLOY(obj);
            forTest.R_DEPLOY(obj);
        });

        DeployButton.OnClickEvents += OnDeployButton;


        dbRef             = Singleton.Instance <DBReference>();
        unitDataReference = Singleton.Instance <AgentRemoteManager>();

        wayPointFactory      = Singleton.Instance <NodeManagerFactory>();
        agentWayPointManager = (SingleWayPointManager)wayPointFactory.GetManager <AgentWayPoint>(NodeManagerFactory.NodeType.Single);
    }