Пример #1
0
        public void LoadCD_AsaseACC()
        {
            foreach (DockPanel pnl in dockManagerMain.Panels)
                pnl.Enabled = false;

            repositoryItemLookUpEditasase_code.DataSource = FXFW.SqlDB.LoadDataTable(@"SELECT asase_code, asase_year, SPOS,
            (Select SCHOOL From TBLSCHOOL Where SPOS = CD_AsaseACC.SPOS) AS SCHOOL, school_allcode FROM CD_AsaseACC ORDER BY asase_code DESC");
            DataTable dt = (DataTable)repositoryItemLookUpEditasase_code.DataSource;
            if (dt.Rows.Count == 0)
            {
                CodeFrm FrmCode = new CodeFrm(CodeFrm.TableNames.CD_AsaseACC) { Icon = FXFW.SqlDB.MakeIcon(imageCollection32.Images["CD_AsaseACC.png"], 32, false) };
                FrmCode.ShowDialog();
                Application.Exit();
            }
            else
            {
                barEditItemasase_code.EditValue = dt.Rows[0]["asase_code"];
                DevExpress.XtraEditors.Controls.ButtonPredefines btn = new DevExpress.XtraEditors.Controls.ButtonPredefines();
                btn = DevExpress.XtraEditors.Controls.ButtonPredefines.OK;
                repositoryItemLookUpEditasase_code_ButtonClick(repositoryItemLookUpEditasase_code, new DevExpress.XtraEditors.Controls.ButtonPressedEventArgs(new DevExpress.XtraEditors.Controls.EditorButton(btn)));
            }
        }
 private void repositoryItemGridLookUpEditTakdeerId_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
 {
     if (e.Button.Kind != DevExpress.XtraEditors.Controls.ButtonPredefines.Plus)
         return;
     CodeFrm FrmCode = new CodeFrm(CodeFrm.TableNames.CDTakdeer);
     FrmCode.ShowDialog();
     LoadDefaultData(CodeFrm.TableNames.CDTakdeer);
 }