public void Insert_NachislSumma_Information(Class_NachislSumma _Obj) { MongoCollection<Class_NachislSumma> Collection_ = Database_.GetCollection<Class_NachislSumma>("NachislSumma"); BsonDocument Stu_Doc = new BsonDocument { { "Id", _Obj.Id }, { "AccountCD", _Obj.AccountCD }, { "ServiceCD", _Obj.ServiceCD }, { "NachislSum", _Obj.NachislSum }, { "NachislMonth", _Obj.NachislMonth }, { "NachislYear", _Obj.NachislYear } }; Collection_.Insert(Stu_Doc); }
private void toolStripButtonAdd_Click(object sender, EventArgs e) { Class_NachislSumma N = new Class_NachislSumma(); Form_EditNachislSumma _f = new Form_EditNachislSumma(N); _f.ShowDialog(); Load_Data(); }
public void Save_NachislSumma_Information(Class_NachislSumma _Obj) { MongoCollection<Class_NachislSumma> Collection_ = Database_.GetCollection<Class_NachislSumma>("NachislSumma"); BsonDocument Stu_Doc = new BsonDocument() .Add("_id", _Obj._id) .Add("AccountCD", _Obj.AccountCD) .Add("ServiceCD", _Obj.ServiceCD) .Add("NachislSum", _Obj.NachislSum) .Add("NachislMonth", _Obj.NachislMonth) .Add("NachislYear", _Obj.NachislYear); Collection_.Save(Stu_Doc); }
public void Update_NachislSumma_Information(Class_NachislSumma _Obj) { MongoCollection<Class_NachislSumma> Collection_ = Database_.GetCollection<Class_NachislSumma>("NachislSumma"); IMongoQuery Marker = Query.EQ("Id", _Obj.Id); IMongoUpdate Update_ = MongoDB.Driver.Builders.Update .Set("AccountCD", _Obj.AccountCD) .Set("ServiceCD", _Obj.ServiceCD) .Set("NachislSum", _Obj.NachislSum) .Set("NachislMonth", _Obj.NachislMonth) .Set("NachislYear", _Obj.NachislYear); Collection_.Update(Marker, Update_); }
private void toolStripBupdate_Click(object sender, EventArgs e) { Class_NachislSumma N = (Class_NachislSumma)BSNachislSumma.Current; Form_EditNachislSumma _f = new Form_EditNachislSumma(N); if (N != null) { _f.ShowDialog(); Load_Data(); } else { MessageBox.Show("Выберите начисление"); } }
private void toolStripButtonDelete_Click(object sender, EventArgs e) { Class_NachislSumma A = (Class_NachislSumma)BSNachislSumma.Current; if (A != null) { DialogResult dr = MessageBox.Show("Удалить начисление " + A.Id + "?", "Внимание!", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (dr == System.Windows.Forms.DialogResult.Yes) { _Obj.Delete_NachislSumma_Infromation(A); } Load_Data(); } else { MessageBox.Show("Выберите начисление"); } }
public void Delete_NachislSumma_Infromation(Class_NachislSumma _Obj) { MongoCollection<Class_NachislSumma> Collection_ = Database_.GetCollection<Class_NachislSumma>("NachislSumma"); IMongoQuery Marker = Query.EQ("Id", _Obj.Id); Collection_.Remove(Marker); }
public Form_EditNachislSumma(Class_NachislSumma StuObj) { InitializeComponent(); StuObj_ = StuObj; }