///<summary></summary> public static long Insert(FormPat Cur) { if(RemotingClient.RemotingRole==RemotingRole.ClientWeb) { Cur.FormPatNum=Meth.GetLong(MethodBase.GetCurrentMethod(),Cur); return Cur.FormPatNum; } return Crud.FormPatCrud.Insert(Cur); }
///<summary></summary> public FormPat Copy() { FormPat f = new FormPat(); f = (FormPat)this.MemberwiseClone(); f.QuestionList = new List <Question>(QuestionList); return(f); }
///<summary></summary> public static long Insert(FormPat Cur) { if (RemotingClient.RemotingRole == RemotingRole.ClientWeb) { Cur.FormPatNum = Meth.GetLong(MethodBase.GetCurrentMethod(), Cur); return(Cur.FormPatNum); } return(Crud.FormPatCrud.Insert(Cur)); }
///<summary></summary> public FormPat Copy() { FormPat f = new FormPat(); f.FormPatNum = FormPatNum; f.PatNum = PatNum; f.FormDateTime = FormDateTime; f.QuestionList = new List <Question>(QuestionList); return(f); }
public static FormPat GetOne(long formPatNum) { if (RemotingClient.RemotingRole == RemotingRole.ClientWeb) { return(Meth.GetObject <FormPat>(MethodBase.GetCurrentMethod(), formPatNum)); } string command = "SELECT * FROM formpat WHERE FormPatNum=" + POut.Long(formPatNum); FormPat formpat = Crud.FormPatCrud.SelectOne(formPatNum); if (formpat == null) { return(null); //should never happen. } command = "SELECT * FROM question WHERE FormPatNum=" + POut.Long(formPatNum); formpat.QuestionList = Crud.QuestionCrud.SelectMany(command); return(formpat); }
private void SaveQuestions(){ FormPat form=new FormPat(); form.PatNum=PatCur.PatNum; form.FormDateTime=DateTime.Now; FormPats.Insert(form); Question quest; ArrayList ALval; for(int i=0;i<QuestionDefList.Length;i++) { quest=new Question(); quest.PatNum=PatCur.PatNum; quest.ItemOrder=QuestionDefList[i].ItemOrder; quest.Description=QuestionDefList[i].Description; if(QuestionDefList[i].QuestType==QuestionType.FreeformText) { ALval=multInput.GetCurrentValues(i); if(ALval.Count>0) { quest.Answer=ALval[0].ToString(); } //else it will just be blank } else if(QuestionDefList[i].QuestType==QuestionType.YesNoUnknown) { quest.Answer=Lan.g("enumYN",multInput.GetCurrentValues(i)[0].ToString()); } quest.FormPatNum=form.FormPatNum; Questions.Insert(quest); } }
///<summary></summary> public FormPat Copy(){ FormPat f=new FormPat(); f=(FormPat)this.MemberwiseClone(); f.QuestionList=new List<Question>(QuestionList); return f; }
private void butComm_Click(object sender, System.EventArgs e) { FormPat form=new FormPat(); form.PatNum=PatCur.PatNum; form.FormDateTime=DateTime.Now; FormFormPatEdit FormP=new FormFormPatEdit(); FormP.FormPatCur=form; FormP.IsNew=true; FormP.ShowDialog(); if(FormP.DialogResult==DialogResult.OK) { ModuleSelected(PatCur.PatNum); } }
private void toolBarButComm_Click() { FormPat form=new FormPat(); form.PatNum=PatCur.PatNum; form.FormDateTime=DateTime.Now; FormFormPatEdit FormP=new FormFormPatEdit(); FormP.FormPatCur=form; FormP.IsNew=true; FormP.ShowDialog(); if(FormP.DialogResult==DialogResult.OK) { ModuleSelected(PatCur.PatNum); } }