Esempio n. 1
0
 public void Save_Services_Information(Class_Services _Obj)
 {
     MongoCollection<Class_Services> Collection_ = Database_.GetCollection<Class_Services>("Services");
     BsonDocument Stu_Doc = new BsonDocument()
         .Add("_id", _Obj._id)
         .Add("SERVICENM", _Obj.SERVICENM);
     Collection_.Save(Stu_Doc);
 }
Esempio n. 2
0
        private void toolStripButtonAdd_Click(object sender, EventArgs e)
        {
            Class_Services    S  = new Class_Services();
            Form_EditServices _f = new Form_EditServices(S);

            _f.ShowDialog();
            Load_Data();
        }
Esempio n. 3
0
 public void Update_Services_Information(Class_Services _Obj)
 {
     MongoCollection<Class_Services> Collection_ = Database_.GetCollection<Class_Services>("Services");
     IMongoQuery Marker = Query.EQ("Id", _Obj.Id);
     IMongoUpdate Update_ = MongoDB.Driver.Builders.Update
         .Set("SERVICENM", _Obj.SERVICENM);
     Collection_.Update(Marker, Update_);
 }
Esempio n. 4
0
 public void Insert_Services_Information(Class_Services _Obj)
 {
     MongoCollection<Class_Services> Collection_ = Database_.GetCollection<Class_Services>("Services");
     BsonDocument Stu_Doc = new BsonDocument {  
         {  
             "Id", _Obj.Id
         },
         {  
             "SERVICENM", _Obj.SERVICENM
         }
     };
     Collection_.Insert(Stu_Doc);
 }
Esempio n. 5
0
        private void toolStripBupdate_Click(object sender, EventArgs e)
        {
            Class_Services    S  = (Class_Services)BSServices.Current;
            Form_EditServices _f = new Form_EditServices(S);

            if (S != null)
            {
                _f.ShowDialog();
                Load_Data();
            }
            else
            {
                MessageBox.Show("Выберите услугу");
            }
        }
Esempio n. 6
0
        private void toolStripButtonDelete_Click(object sender, EventArgs e)
        {
            Class_Services A = (Class_Services)BSServices.Current;

            if (A != null)
            {
                DialogResult dr = MessageBox.Show("Удалить услугу " + A.SERVICENM + "?",
                                                  "Внимание!", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
                if (dr == System.Windows.Forms.DialogResult.Yes)
                {
                    _Obj.Delete_Services_Infromation(A);
                }
                Load_Data();
            }
            else
            {
                MessageBox.Show("Выберите услугу");
            }
        }
Esempio n. 7
0
 public void Delete_Services_Infromation(Class_Services _Obj)
 {
     MongoCollection<Class_Services> Collection_ = Database_.GetCollection<Class_Services>("Services");
     IMongoQuery Marker = Query.EQ("Id", _Obj.Id);
     Collection_.Remove(Marker);
 }
Esempio n. 8
0
 public Form_EditServices(Class_Services StuObj)
 {
     InitializeComponent();
     StuObj_ = StuObj;
 }