private void LoadDefaultData(CodeFrm.TableNames TableName) { switch (TableName) { case CodeFrm.TableNames.CD_KastBnood: repositoryItemGridLookUpEditMoaahel_ID.DataSource = SqlDB.LoadDataTable(@"SELECT qualId, qualName, qualName_e FROM CDQualification"); repositoryItemGridLookUpEditMoaahel_ID.DisplayMember = "qualName"; repositoryItemGridLookUpEditMoaahel_ID.ValueMember = "qualId"; break; case CodeFrm.TableNames.CD_Specialization: repositoryItemGridLookUpEditSPECIFICATION_ID.DataSource = SqlDB.LoadDataTable(@"SELECT SpecializationId, SpecializationName, SpecializationName_e FROM CD_Specialization"); repositoryItemGridLookUpEditSPECIFICATION_ID.DisplayMember = "SpecializationName"; repositoryItemGridLookUpEditSPECIFICATION_ID.ValueMember = "SpecializationId"; break; case CodeFrm.TableNames.CD_KastSaf: repositoryItemGridLookUpEditQualifiedPlaceId.DataSource = SqlDB.LoadDataTable(@"SELECT QualifiedPlaceId, QualifiedPlaceName, QualifiedPlaceName_e FROM CD_QualifiedPlace"); repositoryItemGridLookUpEditQualifiedPlaceId.DisplayMember = "QualifiedPlaceName"; repositoryItemGridLookUpEditQualifiedPlaceId.ValueMember = "QualifiedPlaceId"; break; case CodeFrm.TableNames.CDTakdeer: repositoryItemGridLookUpEditTakdeerId.DataSource = SqlDB.LoadDataTable(@"SELECT TakdeerId, TakdeerName, TakdeerName_e FROM CDTakdeer"); repositoryItemGridLookUpEditTakdeerId.DisplayMember = "TakdeerName"; repositoryItemGridLookUpEditTakdeerId.ValueMember = "TakdeerId"; break; case CodeFrm.TableNames.All: //CDQualification repositoryItemGridLookUpEditMoaahel_ID.DataSource = SqlDB.LoadDataTable(@"SELECT qualId, qualName, qualName_e FROM CDQualification"); repositoryItemGridLookUpEditMoaahel_ID.DisplayMember = "qualName"; repositoryItemGridLookUpEditMoaahel_ID.ValueMember = "qualId"; //CD_Specialization repositoryItemGridLookUpEditSPECIFICATION_ID.DataSource = SqlDB.LoadDataTable(@"SELECT SpecializationId, SpecializationName, SpecializationName_e FROM CD_Specialization"); repositoryItemGridLookUpEditSPECIFICATION_ID.DisplayMember = "SpecializationName"; repositoryItemGridLookUpEditSPECIFICATION_ID.ValueMember = "SpecializationId"; //TBL_Emp repositoryItemGridLookUpEditEmp_ID.DataSource = SqlDB.LoadDataTable(@"SELECT EmpID, EMP_FIRST_NAME + ' ' + EMP_FATHER_NAME + ' ' + EMP_FAM_NAME + ' ' + EMP_FOURTH_NAME AS Emp_Name FROM TBL_Emp"); repositoryItemGridLookUpEditEmp_ID.DisplayMember = "Emp_Name"; repositoryItemGridLookUpEditEmp_ID.ValueMember = "EmpID"; //CD_QualifiedPlace repositoryItemGridLookUpEditQualifiedPlaceId.DataSource = SqlDB.LoadDataTable(@"SELECT QualifiedPlaceId, QualifiedPlaceName, QualifiedPlaceName_e FROM CD_QualifiedPlace"); repositoryItemGridLookUpEditQualifiedPlaceId.DisplayMember = "QualifiedPlaceName"; repositoryItemGridLookUpEditQualifiedPlaceId.ValueMember = "QualifiedPlaceId"; //CDTakdeer repositoryItemGridLookUpEditTakdeerId.DataSource = SqlDB.LoadDataTable(@"SELECT TakdeerId, TakdeerName, TakdeerName_e FROM CDTakdeer"); repositoryItemGridLookUpEditTakdeerId.DisplayMember = "TakdeerName"; repositoryItemGridLookUpEditTakdeerId.ValueMember = "TakdeerId"; break; default: break; } }
private void LoadDefaultData(CodeFrm.TableNames TableName) { switch (TableName) { case CodeFrm.TableNames.CD_Courses: repositoryItemGridLookUpEditCourseId.DataSource = SqlDB.LoadDataTable(@"SELECT CourseId, CourseName, CourseName_e FROM CD_Courses"); repositoryItemGridLookUpEditCourseId.DisplayMember = "CourseName"; repositoryItemGridLookUpEditCourseId.ValueMember = "CourseId"; break; case CodeFrm.TableNames.CDPlaceTraining: repositoryItemGridLookUpEditPlaceTrainingId.DataSource = SqlDB.LoadDataTable(@"SELECT PlaceTrainingId, PlaceTrainingName, PlaceTrainingName_e FROM CDPlaceTraining"); repositoryItemGridLookUpEditPlaceTrainingId.DisplayMember = "PlaceTrainingName"; repositoryItemGridLookUpEditPlaceTrainingId.ValueMember = "PlaceTrainingId"; break; case CodeFrm.TableNames.CDTakdeer: repositoryItemGridLookUpEditTakdeerId.DataSource = SqlDB.LoadDataTable(@"SELECT TakdeerId, TakdeerName, TakdeerName_e FROM CDTakdeer"); repositoryItemGridLookUpEditTakdeerId.DisplayMember = "TakdeerName"; repositoryItemGridLookUpEditTakdeerId.ValueMember = "TakdeerId"; break; case CodeFrm.TableNames.All: //CD_Courses repositoryItemGridLookUpEditCourseId.DataSource = SqlDB.LoadDataTable(@"SELECT CourseId, CourseName, CourseName_e FROM CD_Courses"); repositoryItemGridLookUpEditCourseId.DisplayMember = "CourseName"; repositoryItemGridLookUpEditCourseId.ValueMember = "CourseId"; //CDPlaceTraining repositoryItemGridLookUpEditPlaceTrainingId.DataSource = SqlDB.LoadDataTable(@"SELECT PlaceTrainingId, PlaceTrainingName, PlaceTrainingName_e FROM CDPlaceTraining"); repositoryItemGridLookUpEditPlaceTrainingId.DisplayMember = "PlaceTrainingName"; repositoryItemGridLookUpEditPlaceTrainingId.ValueMember = "PlaceTrainingId"; //CDTakdeer repositoryItemGridLookUpEditTakdeerId.DataSource = SqlDB.LoadDataTable(@"SELECT TakdeerId, TakdeerName, TakdeerName_e FROM CDTakdeer"); repositoryItemGridLookUpEditTakdeerId.DisplayMember = "TakdeerName"; repositoryItemGridLookUpEditTakdeerId.ValueMember = "TakdeerId"; //TBL_Emp repositoryItemGridLookUpEditEmpID.DataSource = SqlDB.LoadDataTable(@"SELECT EmpID, EMP_FIRST_NAME + ' ' + EMP_FATHER_NAME + ' ' + EMP_FAM_NAME + ' ' + EMP_FOURTH_NAME AS Emp_Name FROM TBL_Emp"); repositoryItemGridLookUpEditEmpID.DisplayMember = "Emp_Name"; repositoryItemGridLookUpEditEmpID.ValueMember = "EmpID"; break; default: break; } }
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 LoadDefaultData(CodeFrm.TableNames TableName) { switch (TableName) { case CodeFrm.TableNames.CD_AgazaType: repositoryItemGridLookUpEditagaza_type_code.DataSource = SqlDB.LoadDataTable(@"SELECT AgazaTypeId, AgazaTypeName, AgazaTypeName_e FROM CD_AgazaType"); repositoryItemGridLookUpEditagaza_type_code.DisplayMember = "AgazaTypeName"; repositoryItemGridLookUpEditagaza_type_code.ValueMember = "AgazaTypeId"; break; case CodeFrm.TableNames.All: //CD_Specialization repositoryItemGridLookUpEditagaza_type_code.DataSource = SqlDB.LoadDataTable(@"SELECT AgazaTypeId, AgazaTypeName, AgazaTypeName_e FROM CD_AgazaType"); repositoryItemGridLookUpEditagaza_type_code.DisplayMember = "AgazaTypeName"; repositoryItemGridLookUpEditagaza_type_code.ValueMember = "AgazaTypeId"; //TBL_Emp repositoryItemGridLookUpEditEmpID.DataSource = SqlDB.LoadDataTable(@"SELECT EmpID, ISNULL(EMP_FIRST_NAME, '') + ' ' + ISNULL(EMP_FATHER_NAME, '') + ' ' + ISNULL(EMP_FAM_NAME, '') + ' ' + ISNULL(EMP_FOURTH_NAME, '') AS Emp_Name FROM TBL_Emp"); repositoryItemGridLookUpEditEmpID.DisplayMember = "Emp_Name"; repositoryItemGridLookUpEditEmpID.ValueMember = "EmpID"; break; default: break; } }
private void LoadDefaultData(CodeFrm.TableNames TableName) { switch (TableName) { case CodeFrm.TableNames.CD_EznType: repositoryItemGridLookUpEditEznTypeId.DataSource = SqlDB.LoadDataTable(@"SELECT EznTypeId, EznType, EznType_e FROM CD_EznType"); repositoryItemGridLookUpEditEznTypeId.DisplayMember = "EznType"; repositoryItemGridLookUpEditEznTypeId.ValueMember = "EznTypeId"; break; case CodeFrm.TableNames.All: //TBL_Emp repositoryItemGridLookUpEditEmpID.DataSource = SqlDB.LoadDataTable(@"SELECT EmpID, EMP_FIRST_NAME + ' ' + EMP_FATHER_NAME + ' ' + EMP_FAM_NAME + ' ' + EMP_FOURTH_NAME AS Emp_Name FROM TBL_Emp"); repositoryItemGridLookUpEditEmpID.DisplayMember = "Emp_Name"; repositoryItemGridLookUpEditEmpID.ValueMember = "EmpID"; //CD_EznType repositoryItemGridLookUpEditEznTypeId.DataSource = SqlDB.LoadDataTable(@"SELECT EznTypeId, EznType, EznType_e FROM CD_EznType"); repositoryItemGridLookUpEditEznTypeId.DisplayMember = "EznType"; repositoryItemGridLookUpEditEznTypeId.ValueMember = "EznTypeId"; break; default: break; } }
private void navBarItemAccCD_KastBnood_LinkClicked(object sender, NavBarLinkEventArgs e) { CodeFrm FrmCode = new CodeFrm(CodeFrm.TableNames.CD_KastBnood) { MdiParent = this, Icon = FXFW.SqlDB.MakeIcon(imageCollection32.Images["CD_KastBnood.png"], 32, false) }; FrmCode.Show(); }
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); }