Ejemplo n.º 1
0
		///<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);
		}
Ejemplo n.º 2
0
        ///<summary></summary>
        public FormPat Copy()
        {
            FormPat f = new FormPat();

            f = (FormPat)this.MemberwiseClone();
            f.QuestionList = new List <Question>(QuestionList);
            return(f);
        }
Ejemplo n.º 3
0
 ///<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));
 }
Ejemplo n.º 4
0
        ///<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);
        }
Ejemplo n.º 5
0
        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);
        }
Ejemplo n.º 6
0
		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);
			}
		}
Ejemplo n.º 7
0
Archivo: FormPat.cs Proyecto: mnisl/OD
		///<summary></summary>
		public FormPat Copy(){
			FormPat f=new FormPat();
			f=(FormPat)this.MemberwiseClone();
			f.QuestionList=new List<Question>(QuestionList);
			return f;
		}
Ejemplo n.º 8
0
		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);
			}
		}
Ejemplo n.º 9
0
		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);
			}
		}