Пример #1
0
        private void simpleButtonAdd_Click(object sender, EventArgs e)
        {
            IndexSurat indexSurat = new IndexSurat(XpoDefault.Session)
            {
                Index     = textEditIndex.Text.Trim(),
                Keperluan = textEditKeperluan.Text.Trim(),
            };

            indexSurat.Save();
            ClearForm();
            xpCollectionData.Reload();
        }
Пример #2
0
        private void GetFromGrid()
        {
            try
            {
                if (gridViewData.SelectedRowsCount != 0)
                {
                    indexSurat = (IndexSurat)gridViewData.GetRow(gridViewData.FocusedRowHandle);

                    textEditIndex.Text     = indexSurat.Index;
                    textEditKeperluan.Text = indexSurat.Keperluan;
                }
            }
            catch (Exception exception)
            {
                XtraMessageBox.Show(exception.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }