private void gridMain_CellDoubleClick(object sender, ODGridClickEventArgs e) { FormRecallEdit FormR = new FormRecallEdit(); FormR.RecallCur = RecallList[e.Row].Copy(); FormR.ShowDialog(); FillGrid(); }
private void butEditRecall_Click(object sender, System.EventArgs e) { FormRecallEdit FormRE = new FormRecallEdit(PatCur); FormRE.RecallCur = RecallCur; FormRE.ShowDialog(); FillRecall(); }
private void butAdd_Click(object sender,EventArgs e) { Recall recall=new Recall(); recall.RecallTypeNum=0;//user will have to pick recall.PatNum=PatNum; recall.RecallInterval=new Interval(0,0,6,0); FormRecallEdit FormRE=new FormRecallEdit(); FormRE.IsNew=true; FormRE.RecallCur=recall; FormRE.ShowDialog(); FillGrid(); }
private void butAdd_Click(object sender, EventArgs e) { Recall recall = new Recall(); recall.RecallTypeNum = 0; //user will have to pick recall.PatNum = PatNum; recall.RecallInterval = new Interval(0, 0, 6, 0); FormRecallEdit FormRE = new FormRecallEdit(); FormRE.IsNew = true; FormRE.RecallCur = recall; FormRE.ShowDialog(); FillGrid(); }
private void gridMain_CellDoubleClick(object sender,ODGridClickEventArgs e) { FormRecallEdit FormR=new FormRecallEdit(); FormR.RecallCur=RecallList[e.Row].Copy(); FormR.ShowDialog(); FillGrid(); }
private void gridMain_CellDoubleClick(object sender,ODGridClickEventArgs e) { SelectedPatNum=PIn.Long(table.Rows[e.Row]["PatNum"].ToString()); Recall recall=Recalls.GetRecall(PIn.Long(table.Rows[e.Row]["RecallNum"].ToString())); FormRecallEdit FormR=new FormRecallEdit(); FormR.RecallCur=recall.Copy(); FormR.ShowDialog(); if(FormR.DialogResult!=DialogResult.OK) { return; } if(recall.RecallStatus!=FormR.RecallCur.RecallStatus//if the status has changed || (recall.IsDisabled != FormR.RecallCur.IsDisabled)//or any of the three disabled fields was changed || (recall.DisableUntilDate != FormR.RecallCur.DisableUntilDate) || (recall.DisableUntilBalance != FormR.RecallCur.DisableUntilBalance) || (recall.Note != FormR.RecallCur.Note))//or a note was added { //make a commlog entry //unless there is an existing recall commlog entry for today bool recallEntryToday=false; List<Commlog> CommlogList=Commlogs.Refresh(SelectedPatNum); for(int i=0;i<CommlogList.Count;i++) { if(CommlogList[i].CommDateTime.Date==DateTime.Today && CommlogList[i].CommType==Commlogs.GetTypeAuto(CommItemTypeAuto.RECALL)) { recallEntryToday=true; } } if(!recallEntryToday) { Commlog CommlogCur=new Commlog(); CommlogCur.CommDateTime=DateTime.Now; CommlogCur.CommType=Commlogs.GetTypeAuto(CommItemTypeAuto.RECALL); CommlogCur.PatNum=SelectedPatNum; CommlogCur.Note=""; if(recall.RecallStatus!=FormR.RecallCur.RecallStatus) { if(FormR.RecallCur.RecallStatus==0) { CommlogCur.Note+=Lan.g(this,"Status None"); } else { CommlogCur.Note+=DefC.GetName(DefCat.RecallUnschedStatus,FormR.RecallCur.RecallStatus); } } if(recall.DisableUntilDate!=FormR.RecallCur.DisableUntilDate && FormR.RecallCur.DisableUntilDate.Year>1880) { if(CommlogCur.Note!="") { CommlogCur.Note+=", "; } CommlogCur.Note+=Lan.g(this,"Disabled until ")+FormR.RecallCur.DisableUntilDate.ToShortDateString(); } if(recall.DisableUntilBalance!=FormR.RecallCur.DisableUntilBalance && FormR.RecallCur.DisableUntilBalance>0) { if(CommlogCur.Note!="") { CommlogCur.Note+=", "; } CommlogCur.Note+=Lan.g(this,"Disabled until balance below ")+FormR.RecallCur.DisableUntilBalance.ToString("c"); } if(recall.Note!=FormR.RecallCur.Note) { if(CommlogCur.Note!="") { CommlogCur.Note+=", "; } CommlogCur.Note+=FormR.RecallCur.Note; } CommlogCur.Note+=". "; CommlogCur.UserNum=Security.CurUser.UserNum; FormCommItem FormCI=new FormCommItem(CommlogCur); FormCI.IsNew=true; //forces user to at least consider a commlog entry FormCI.ShowDialog();//typically saved in this window. } } FillMain(null); for(int i=0;i<gridMain.Rows.Count;i++) { if(PIn.Long(table.Rows[i]["PatNum"].ToString())==SelectedPatNum){ gridMain.SetSelected(i,true); } } SetFamilyColors(); }