Beispiel #1
0
        private void barButton_Ngachluong_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            Frmrex_Dm_Ngachluong_Add objFrmrex_Dm_Ngachluong_Add = new Frmrex_Dm_Ngachluong_Add();

            objFrmrex_Dm_Ngachluong_Add.AllowSelect   = true;
            objFrmrex_Dm_Ngachluong_Add.MaximizeBox   = false;
            objFrmrex_Dm_Ngachluong_Add.MinimizeBox   = false;
            objFrmrex_Dm_Ngachluong_Add.Size          = new Size(800, 600);
            objFrmrex_Dm_Ngachluong_Add.StartPosition = FormStartPosition.CenterScreen;
            objFrmrex_Dm_Ngachluong_Add.ShowDialog();

            if (objFrmrex_Dm_Ngachluong_Add.Rex_Dm_Ngachluong.Id_Ngachluong + "" != "")
            {
                DataSet dsNgachluong = objMasterService.Get_All_Rex_Dm_Ngachluong_Collection().ToDataSet();
                lookUp_Ngachluong.Properties.DataSource = dsNgachluong.Tables[0];
                for (int i = 0; i < dsNgachluong.Tables[0].Rows.Count; i++)
                {
                    if (dsNgachluong.Tables[0].Rows[i]["Id_Ngachluong"] + "" == objFrmrex_Dm_Ngachluong_Add.Rex_Dm_Ngachluong.Id_Ngachluong + "")
                    {
                        lookUp_Ngachluong.ItemIndex = i;
                        break;
                    }
                }
            }
        }
Beispiel #2
0
        private void gridLookUpEdit_Ngachluong_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
        {
            if (e.Button.Kind == DevExpress.XtraEditors.Controls.ButtonPredefines.Ellipsis)
            {
                Frmrex_Dm_Ngachluong_Add frmrex_Dm_Ngachluong_Add = new Frmrex_Dm_Ngachluong_Add();
                frmrex_Dm_Ngachluong_Add.AllowSelect = true;
                GoobizFrame.Windows.MdiUtils.ThemeSettings.SetDialogShow(frmrex_Dm_Ngachluong_Add);
                GoobizFrame.Windows.PlugIn.RightHelpers.CheckUserRightAction(frmrex_Dm_Ngachluong_Add);
                //Ecm.SystemControl.Policy.Auth.Authorization.SetPopupFormAction( GoobizFrame.Windows.MdiUtils.ThemeSettings.GetCurrentUser(), frmrex_Dm_Ngachluong_Add);
                frmrex_Dm_Ngachluong_Add.ShowDialog();

                DataSet dsDm_Ngachluong = frmrex_Dm_Ngachluong_Add.Data;
                lookUp_Ngachluong.Properties.DataSource = dsDm_Ngachluong.Tables[0];
                gridLookUp_Ngachluong.DataSource        = dsDm_Ngachluong.Tables[0];

                if ("" + frmrex_Dm_Ngachluong_Add.Rex_Dm_Ngachluong.Id_Ngachluong != "")
                {
                    gridView1.SetFocusedRowCellValue(gridView1.Columns["Id_Ngachluong"], frmrex_Dm_Ngachluong_Add.Rex_Dm_Ngachluong.Id_Ngachluong);
                }
            }
        }