예제 #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);
		}
예제 #2
0
        ///<summary></summary>
        public FormPat Copy()
        {
            FormPat f = new FormPat();

            f = (FormPat)this.MemberwiseClone();
            f.QuestionList = new List <Question>(QuestionList);
            return(f);
        }
예제 #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));
 }
예제 #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);
        }
예제 #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);
        }
예제 #6
0
파일: FormTerminalOld.cs 프로젝트: mnisl/OD
		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);
			}
		}
예제 #7
0
파일: FormPat.cs 프로젝트: mnisl/OD
		///<summary></summary>
		public FormPat Copy(){
			FormPat f=new FormPat();
			f=(FormPat)this.MemberwiseClone();
			f.QuestionList=new List<Question>(QuestionList);
			return f;
		}
예제 #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);
			}
		}
예제 #9
0
파일: ContrAccount.cs 프로젝트: mnisl/OD
		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);
			}
		}