예제 #1
0
        private void btAdd_Click(object sender, EventArgs e)
        {
            CompanyDetail cd = new CompanyDetail();

            if (cd.ShowDialog() == DialogResult.OK)
            {
                db.AddDoc<CompanyDetail>(cd, "{'Company':$,'Country':$}");
            }
        }
예제 #2
0
        private void dgMainForm_DoubleClick(object sender, EventArgs e)
        {
            var row = dgCompany.SelectedRows[0];

            CompanyDetail cd = new CompanyDetail();

            string query = "{'Company':'" + row.Cells[0].Value + "','Country':'" + row.Cells[1].Value + "'}";

            db.GetWhere(query).Select<CompanyDetail>(cd, "{'Company':$, 'Country':$, 'Employees':[R, {'FirstName':$, 'LastName':$}]}", false, new Serialization.DataTableBehaviour());

            cd.ShowDialog();
        }