예제 #1
0
 public void Update_Street_Information(Class_Street _Obj)
 {
     MongoCollection<Class_Street> Collection_ = Database_.GetCollection<Class_Street>("Street");
     IMongoQuery Marker = Query.EQ("Id", _Obj.Id);
     IMongoUpdate Update_ = MongoDB.Driver.Builders.Update.Set("STREETNM", _Obj.STREETNM);
     Collection_.Update(Marker, Update_);
 }
예제 #2
0
        private void toolStripButtonAdd_Click(object sender, EventArgs e)
        {
            Class_Street    S  = new Class_Street();
            Form_EditStreet _f = new Form_EditStreet(S);

            _f.ShowDialog();
            Load_Data();
        }
예제 #3
0
 public void Save_Street_Information(Class_Street _Obj)
 {
     MongoCollection<Class_Street> Collection_ = Database_.GetCollection<Class_Street>("Street");
     BsonDocument Stu_Doc = new BsonDocument()
         .Add("_id", _Obj._id)
         .Add("STREETNM", _Obj.STREETNM);
     Collection_.Save(Stu_Doc);
 }
예제 #4
0
       public void Insert_Street_Information(Class_Street _Obj)
       {
           MongoCollection<Class_Street> Collection_ = Database_.GetCollection<Class_Street>("Street");
           BsonDocument Stu_Doc = new BsonDocument {  
               {  
                   "Id", _Obj.Id
               }, 
               {  
                   "STREETNM", _Obj.STREETNM  
               }
 
           };
           Collection_.Insert(Stu_Doc);
       }
예제 #5
0
        private void toolStripBupdate_Click(object sender, EventArgs e)
        {
            Class_Street    S  = (Class_Street)BSStreet.Current;
            Form_EditStreet _f = new Form_EditStreet(S);

            if (S != null)
            {
                _f.ShowDialog();
                Load_Data();
            }
            else
            {
                MessageBox.Show("Выберите улицу");
            }
        }
예제 #6
0
        private void toolStripButtonDelete_Click(object sender, EventArgs e)
        {
            Class_Street A = (Class_Street)BSStreet.Current;

            if (A != null)
            {
                DialogResult dr = MessageBox.Show("Удалить улицу " + A.STREETNM + "?",
                                                  "Внимание!", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
                if (dr == System.Windows.Forms.DialogResult.Yes)
                {
                    _Obj.Delete_Street_Infromation(A);
                }
                Load_Data();
            }
            else
            {
                MessageBox.Show("Выберите улицу");
            }
        }
예제 #7
0
 public Form_EditStreet(Class_Street StuObj)
 {
     InitializeComponent();
     StuObj_ = StuObj;
 }
예제 #8
0
 public void Filter_Street_Infromation(Class_Street _Obj)
 {
     MongoCollection<Class_Street> Collection_ = Database_.GetCollection<Class_Street>("Street");
     IMongoQuery Marker = Query.EQ("Id", _Obj.Id);
     Collection_.Find(Marker);
 }