private void butAddAnesthetic_Click(object sender,EventArgs e) { IsUpdate = false; AnestheticRecordCur = new AnestheticRecord(); AnestheticRecordCur.PatNum = PatCur.PatNum; AnestheticRecordCur.AnestheticDate = DateTime.Now; AnestheticRecordCur.ProvNum = PatCur.PriProv; //create new Anesthetic Record AnestheticRecords.Insert(AnestheticRecordCur); //save data from form in db AnestheticRecords.InsertAnestheticData(AnestheticRecordCur); RefreshListAnesthetics(); listAnesthetics.SelectedIndex = 0; //Add -1 after List.Length to select in ascending order }
public FormAnestheticRecord(Patient patCur,AnestheticData AnestheticDataCur) { components=new System.ComponentModel.Container(); // // Required for Windows Form Designer support // InitializeComponent(); Lan.F(this); PatCur = patCur; AnestheticRecord anestheticRecordCur = new AnestheticRecord(); AnestheticRecordCur = anestheticRecordCur; Lan.F(this); allowTopaz = (Environment.OSVersion.Platform != PlatformID.Unix && !CodeBase.ODEnvironment.Is64BitOperatingSystem()); sigBox.SetTabletState(1); if(!allowTopaz) { butSignTopaz.Visible = false; sigBox.Visible = true; } else { //Add signature box for Topaz signatures. sigBoxTopaz = CodeBase.TopazWrapper.GetTopaz(); sigBoxTopaz.Location = sigBox.Location;//this puts both boxes in the same spot. sigBoxTopaz.Name = "sigBoxTopaz"; sigBoxTopaz.Size = new System.Drawing.Size(168,85); sigBoxTopaz.TabIndex = 92; sigBoxTopaz.Text = "sigPlusNET1"; sigBoxTopaz.Visible = false; Controls.Add(sigBoxTopaz); //It starts out accepting input. It will be set to 0 if a sig is already present. It will be set back to 1 if note changes or if user clicks Clear. CodeBase.TopazWrapper.SetTopazState(sigBoxTopaz,1); } }