示例#1
0
		///<summary></summary>
		public static void Update(Letter Cur){
			if(RemotingClient.RemotingRole==RemotingRole.ClientWeb) {
				Meth.GetVoid(MethodBase.GetCurrentMethod(),Cur);
				return;
			}
			Crud.LetterCrud.Update(Cur);
		}
示例#2
0
		///<summary></summary>
		public static long Insert(Letter Cur){
			if(RemotingClient.RemotingRole==RemotingRole.ClientWeb) {
				Cur.LetterNum=Meth.GetLong(MethodBase.GetCurrentMethod(),Cur);
				return Cur.LetterNum;
			}
			return Crud.LetterCrud.Insert(Cur);
		}
示例#3
0
		///<summary></summary>
		public static void Delete(Letter Cur){
			if(RemotingClient.RemotingRole==RemotingRole.ClientWeb) {
				Meth.GetVoid(MethodBase.GetCurrentMethod(),Cur);
				return;
			}
			string command="DELETE from letter WHERE LetterNum = '"+Cur.LetterNum.ToString()+"'";
			Db.NonQ(command);
		}
示例#4
0
文件: FormLetters.cs 项目: mnisl/OD
		private void listLetters_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e) {
			if (listLetters.SelectedIndex == -1) {
				return;
			}
			if (!WarnOK())
				return;
			LetterCur = Letters.List[listLetters.SelectedIndex];
			StringBuilder str = new StringBuilder();
			//return address
			//if (checkIncludeRet.Checked) {
				str.Append(PrefC.GetString(PrefName.PracticeTitle) + "\r\n");
				str.Append(PrefC.GetString(PrefName.PracticeAddress) + "\r\n");
				if (PrefC.GetString(PrefName.PracticeAddress2) != "")
					str.Append(PrefC.GetString(PrefName.PracticeAddress2) + "\r\n");
				str.Append(PrefC.GetString(PrefName.PracticeCity) + ", ");
				str.Append(PrefC.GetString(PrefName.PracticeST) + "  ");
				str.Append(PrefC.GetString(PrefName.PracticeZip) + "\r\n");
			//}
			//else {
			//	str.Append("\r\n\r\n\r\n\r\n");
			//}
			str.Append("\r\n\r\n");
			//address
			if (ReferralCur == null) {
				str.Append(PatCur.FName + " " + PatCur.MiddleI + " " + PatCur.LName + "\r\n");
				str.Append(PatCur.Address + "\r\n");
				if (PatCur.Address2 != "")
					str.Append(PatCur.Address2 + "\r\n");
				str.Append(PatCur.City + ", " + PatCur.State + "  " + PatCur.Zip);
			}
			else {
				str.Append(Referrals.GetNameFL(ReferralCur.ReferralNum) + "\r\n");
				str.Append(ReferralCur.Address + "\r\n");
				if (ReferralCur.Address2 != "")
					str.Append(ReferralCur.Address2 + "\r\n");
				str.Append(ReferralCur.City + ", " + ReferralCur.ST + "  " + ReferralCur.Zip);
			}
			str.Append("\r\n\r\n\r\n\r\n");
			//date
			str.Append(DateTimeOD.Today.ToLongDateString() + "\r\n");
			//referral RE
			if (ReferralCur != null) {
				str.Append(Lan.g(this, "RE Patient: ") + PatCur.GetNameFL() + "\r\n");
			}
			str.Append("\r\n");
			//greeting
			str.Append(Lan.g(this, "Dear "));
			if (ReferralCur == null) {
				if (CultureInfo.CurrentCulture.Name == "en-GB") {
					if (PatCur.Salutation != "")
						str.Append(PatCur.Salutation);
					else {
						if (PatCur.Gender == PatientGender.Female) {
							str.Append("Ms. " + PatCur.LName);
						}
						else {
							str.Append("Mr. " + PatCur.LName);
						}
					}
				}
				else {
					if (PatCur.Salutation != "")
						str.Append(PatCur.Salutation);
					else if (PatCur.Preferred != "")
						str.Append(PatCur.Preferred);
					else
						str.Append(PatCur.FName);
				}
			}
			else {//referral
				str.Append(ReferralCur.FName);
			}
			str.Append(",\r\n\r\n");
			//body text
			str.Append(LetterCur.BodyText);
			//closing
			if (CultureInfo.CurrentCulture.Name == "en-GB") {
				str.Append("\r\n\r\nYours sincerely,\r\n\r\n\r\n\r\n");
			}
			else {
				str.Append("\r\n\r\n" + Lan.g(this, "Sincerely,") + "\r\n\r\n\r\n\r\n");
			}
			if (PrefC.GetBool(PrefName.FuchsOptionsOn)) {
				str.Append("Dr. Fuchs");
			}
			else {
				str.Append(PrefC.GetString(PrefName.PracticeTitle));
			}
			textBody.Text = str.ToString();
			//bodyChanged = false;
		}