///<summary></summary> public static long Insert(RxDef def) { if(RemotingClient.RemotingRole==RemotingRole.ClientWeb) { def.RxDefNum=Meth.GetLong(MethodBase.GetCurrentMethod(),def); return def.RxDefNum; } return Crud.RxDefCrud.Insert(def); }
///<summary></summary> public static void Update(RxDef def) { if(RemotingClient.RemotingRole==RemotingRole.ClientWeb) { Meth.GetVoid(MethodBase.GetCurrentMethod(),def); return; } Crud.RxDefCrud.Update(def); }
///<summary>Also deletes all RxAlerts that were attached.</summary> public static void Delete(RxDef def) { if(RemotingClient.RemotingRole==RemotingRole.ClientWeb) { Meth.GetVoid(MethodBase.GetCurrentMethod(),def); return; } string command="DELETE FROM rxalert WHERE RxDefNum="+POut.Long(def.RxDefNum); Db.NonQ(command); command= "DELETE FROM rxdef WHERE RxDefNum = "+POut.Long(def.RxDefNum); Db.NonQ(command); }
public FormRxAlertEdit(RxAlert rxAlertCur,RxDef rxDefCur) { InitializeComponent(); Lan.F(this); RxAlertCur=rxAlertCur; RxDefCur=rxDefCur; if(!PrefC.GetBool(PrefName.ShowFeatureEhr)){ textRxNorm.Visible=false; labelRxNorm.Visible=false; } }
public FormRxAlertEdit(RxAlert rxAlertCur,RxDef rxDefCur) { InitializeComponent(); Lan.F(this); RxAlertCur=rxAlertCur; RxDefCur=rxDefCur; }
private void butAdd_Click(object sender, System.EventArgs e) { RxDef RxDefCur=new RxDef(); RxDefs.Insert(RxDefCur);//It gets deleted if user clicks cancel FormRxDefEdit FormE=new FormRxDefEdit(RxDefCur); FormE.IsNew=true; FormE.ShowDialog(); FillGrid(); }
///<summary>Must have already saved it to db so that we have a RxDefNum to work with.</summary> public FormRxDefEdit(RxDef rxDefCur){ InitializeComponent();// Required for Windows Form Designer support Lan.F(this); RxDefCur=rxDefCur.Copy(); }