unit uspeciality;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;

type
  TSpecialityForm = class(TForm)
    SpecialityMemo: TMemo;
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    Department: TComboBox;
    Label4: TLabel;
    StudyYear: TEdit;
    Label5: TLabel;
    SpecialityType: TComboBox;
    Label6: TLabel;
    Grade: TEdit;
    Label7: TLabel;
    AddRaBtn: TRadioButton;
    ChaRaBtn: TRadioButton;
    RemoveRaBtn: TRadioButton;
    OkBtn: TButton;
    ExitBtn: TButton;
    SpecialityName: TComboBox;
    procedure OkBtnClick(Sender: TObject);
    procedure ExitBtnClick(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  SpecialityForm: TSpecialityForm;

implementation

{$R *.dfm}

procedure TSpecialityForm.OkBtnClick(Sender: TObject);

var
     tmpstring,r:string;
begin
  if AddRaBtn.checked then
      r:='新增专业'
  else if ChaRaBtn.checked then
      r:='信息修改'
  else if RemoveRaBtn.checked then
      r:='删除专业' ;
  SpecialityMemo.lines.Clear;
  tmpstring:=SpecialityName.items[SpecialityName.itemindex]+'专业所属院系为：';
  tmpstring:=tmpstring+Department.items[Department.itemindex];
  tmpstring:=tmpstring+SpecialityType.items[SpecialityType.itemindex]+'专业'+#13+#10;
  tmpstring:=tmpstring+'学制为'+StudyYear.Text+'年.   ';
tmpstring:=tmpstring+'所需修的学分为:'+Grade.Text+'学分.'+#13+#10;
tmpstring:=tmpstring+'操作类型为'+r;
specialitymemo.Lines.Add(tmpstring);


end;

procedure TSpecialityForm.ExitBtnClick(Sender: TObject);
begin
close;
end;

end.
