private void btnEdit_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { string id = gvProgramList.GetRowCellValue(index, this.ID).ToString(); if (id != null) { GUI.GUI_Program_CreateProgram editform = new GUI_Program_CreateProgram(); editform.idprogram = id; editform.idacc = pr.LoadProgram(id).Single().idAccount; editform.ShowDialog(); } loadData(); }
public List <Program> LoadProgramTest([PexAssumeUnderTest] ProgramBLL target, string id) { List <Program> result = target.LoadProgram(id); return(result); // TODO: add assertions to method ProgramBLLTest.LoadProgramTest(ProgramBLL, String) }
private void GUI_Program_CreateProgram_Load(object sender, EventArgs e) { if (idprogram == "") { cboProgramMaster.DataSource = ac.LoadAccount(); cboProgramMaster.DisplayMember = "name"; cboProgramMaster.ValueMember = "id"; } else { cboProgramMaster.DataSource = ac.LoadAccount(); cboProgramMaster.DisplayMember = "name"; cboProgramMaster.ValueMember = "id"; cboProgramMaster.SelectedValue = idacc; txtProgramName.Text = p.LoadProgram(idprogram).Single().name; } }
private void GUI_Program_ProgramInfo_Load(object sender, EventArgs e) { if (pro.getLock(id) == true) { txtProgramActor.ReadOnly = true; txtProgramBranch.ReadOnly = true; txtProgramLevel.ReadOnly = true; txtProgramMark.ReadOnly = true; txtProgramName.ReadOnly = true; txtProgramPoint.ReadOnly = true; txtProgramProcess.ReadOnly = true; txtProgramSemester.ReadOnly = true; txtProgramTime.ReadOnly = true; txtProgramType.ReadOnly = true; txtProgramVolume.ReadOnly = true; btnSave.Enabled = false; } txtProgramName.Text = pro.LoadProgram(id).Single().name; txtProgramName.ReadOnly = true; if (pro.LoadProgram(id).Single().ProgramActor != null || pro.LoadProgram(id).Single().ProgramActor != "") { txtProgramActor.Text = pro.LoadProgram(id).Single().ProgramActor; } if (pro.LoadProgram(id).Single().ProgramBranch != null || pro.LoadProgram(id).Single().ProgramBranch != "") { txtProgramBranch.Text = pro.LoadProgram(id).Single().ProgramBranch; } if (pro.LoadProgram(id).Single().ProgramLevel != null || pro.LoadProgram(id).Single().ProgramLevel != "") { txtProgramLevel.Text = pro.LoadProgram(id).Single().ProgramLevel; } if (pro.LoadProgram(id).Single().ProgramVolume != null || pro.LoadProgram(id).Single().ProgramVolume != "") { txtProgramVolume.Text = pro.LoadProgram(id).Single().ProgramVolume; } if (pro.LoadProgram(id).Single().ProgramType != null || pro.LoadProgram(id).Single().ProgramType != "") { txtProgramType.Text = pro.LoadProgram(id).Single().ProgramType; } if (pro.LoadProgram(id).Single().ProgramTime != null || pro.LoadProgram(id).Single().ProgramTime != "") { txtProgramTime.Text = pro.LoadProgram(id).Single().ProgramTime; } if (pro.LoadProgram(id).Single().ProgramProcess != null || pro.LoadProgram(id).Single().ProgramProcess != "") { txtProgramProcess.Text = pro.LoadProgram(id).Single().ProgramProcess; } if (pro.LoadProgram(id).Single().ProgramSemester != null || pro.LoadProgram(id).Single().ProgramSemester.ToString() != "") { txtProgramSemester.Text = pro.LoadProgram(id).Single().ProgramSemester.ToString(); } if (pro.LoadProgram(id).Single().ProgramPoint != null || pro.LoadProgram(id).Single().ProgramPoint.ToString() != "") { txtProgramMark.Text = pro.LoadProgram(id).Single().ProgramPoint.ToString(); } if (pro.LoadProgram(id).Single().ProgramTC != null || pro.LoadProgram(id).Single().ProgramTC.ToString() != "") { txtProgramPoint.Text = pro.LoadProgram(id).Single().ProgramTC.ToString(); } }