當前位置: 首頁>>代碼示例>>C#>>正文


C# Patient.GetNameFirstOrPrefL方法代碼示例

本文整理匯總了C#中OpenDentBusiness.Patient.GetNameFirstOrPrefL方法的典型用法代碼示例。如果您正苦於以下問題:C# Patient.GetNameFirstOrPrefL方法的具體用法?C# Patient.GetNameFirstOrPrefL怎麽用?C# Patient.GetNameFirstOrPrefL使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在OpenDentBusiness.Patient的用法示例。


在下文中一共展示了Patient.GetNameFirstOrPrefL方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: GetConfirmList

 ///<summary>Used in FormConfirmList</summary>
 public static DataTable GetConfirmList(DateTime dateFrom,DateTime dateTo,long provNum,long clinicNum)
 {
     if(RemotingClient.RemotingRole==RemotingRole.ClientWeb) {
         return Meth.GetTable(MethodBase.GetCurrentMethod(),dateFrom,dateTo,provNum,clinicNum);
     }
     DataTable table=new DataTable();
     DataRow row;
     //columns that start with lowercase are altered for display rather than being raw data.
     table.Columns.Add("AddrNote");
     table.Columns.Add("AptNum");
     table.Columns.Add("age");
     table.Columns.Add("AptDateTime",typeof(DateTime));
     table.Columns.Add("aptDateTime");
     table.Columns.Add("confirmed");
     table.Columns.Add("contactMethod");
     table.Columns.Add("email");//could be patient or guarantor email.
     table.Columns.Add("Guarantor");
     table.Columns.Add("medNotes");
     table.Columns.Add("nameF");//or preferred.
     table.Columns.Add("nameFL");
     table.Columns.Add("Note");
     table.Columns.Add("patientName");
     table.Columns.Add("PatNum");
     table.Columns.Add("PreferConfirmMethod");
     table.Columns.Add("ProcDescript");
     List<DataRow> rows=new List<DataRow>();
     string command="SELECT patient.PatNum,"
         +"patient.LName,"
         +"patient.FName,patient.Preferred,patient.LName, "
         +"patient.Guarantor,AptDateTime,patient.Birthdate,patient.HmPhone,"
         +"patient.WkPhone,patient.WirelessPhone,ProcDescript,Confirmed,Note,"
         +"patient.AddrNote,AptNum,patient.MedUrgNote,patient.PreferConfirmMethod,"
         +"guar.Email guarEmail,patient.Email,patient.Premed "
         +"FROM patient,appointment,patient guar "
         +"WHERE patient.PatNum=appointment.PatNum "
         +"AND patient.Guarantor=guar.PatNum "
         +"AND AptDateTime > "+POut.Date(dateFrom)+" "
         +"AND AptDateTime < "+POut.Date(dateTo.AddDays(1))+" "
         +"AND (AptStatus=1 "//scheduled
         +"OR AptStatus=4) ";//ASAP
     if(provNum>0){
         command+="AND (appointment.ProvNum="+POut.Long(provNum)+" OR appointment.ProvHyg="+POut.Long(provNum)+") ";
     }
     if(clinicNum>0) {
         command+="AND appointment.ClinicNum="+POut.Long(clinicNum)+" ";
     }
     command+="ORDER BY AptDateTime";
     DataTable rawtable=Db.GetTable(command);
     DateTime dateT;
     Patient pat;
     ContactMethod contmeth;
     for(int i=0;i<rawtable.Rows.Count;i++) {
         row=table.NewRow();
         row["AddrNote"]=rawtable.Rows[i]["AddrNote"].ToString();
         row["AptNum"]=rawtable.Rows[i]["AptNum"].ToString();
         row["age"]=Patients.DateToAge(PIn.Date(rawtable.Rows[i]["Birthdate"].ToString())).ToString();//we don't care about m/y.
         dateT=PIn.DateT(rawtable.Rows[i]["AptDateTime"].ToString());
         row["AptDateTime"]=dateT;
         row["aptDateTime"]=dateT.ToShortDateString()+"\r\n"+dateT.ToShortTimeString();
         row["confirmed"]=DefC.GetName(DefCat.ApptConfirmed,PIn.Long(rawtable.Rows[i]["Confirmed"].ToString()));
         contmeth=(ContactMethod)PIn.Int(rawtable.Rows[i]["PreferConfirmMethod"].ToString());
         if(contmeth==ContactMethod.None || contmeth==ContactMethod.HmPhone) {
             row["contactMethod"]=Lans.g("FormConfirmList","Hm:")+rawtable.Rows[i]["HmPhone"].ToString();
         }
         if(contmeth==ContactMethod.WkPhone) {
             row["contactMethod"]=Lans.g("FormConfirmList","Wk:")+rawtable.Rows[i]["WkPhone"].ToString();
         }
         if(contmeth==ContactMethod.WirelessPh) {
             row["contactMethod"]=Lans.g("FormConfirmList","Cell:")+rawtable.Rows[i]["WirelessPhone"].ToString();
         }
         if(contmeth==ContactMethod.Email) {
             row["contactMethod"]=rawtable.Rows[i]["Email"].ToString();
         }
         if(contmeth==ContactMethod.DoNotCall || contmeth==ContactMethod.SeeNotes) {
             row["contactMethod"]=Lans.g("enumContactMethod",contmeth.ToString());
         }
         if(rawtable.Rows[i]["Email"].ToString()=="" && rawtable.Rows[i]["guarEmail"].ToString()!="") {
             row["email"]=rawtable.Rows[i]["guarEmail"].ToString();
         }
         else {
             row["email"]=rawtable.Rows[i]["Email"].ToString();
         }
         row["Guarantor"]=rawtable.Rows[i]["Guarantor"].ToString();
         row["medNotes"]="";
         if(rawtable.Rows[i]["Premed"].ToString()=="1"){
             row["medNotes"]=Lans.g("FormConfirmList","Premedicate");
         }
         if(rawtable.Rows[i]["MedUrgNote"].ToString()!=""){
             if(row["medNotes"].ToString()!="") {
                 row["medNotes"]+="\r\n";
             }
             row["medNotes"]+=rawtable.Rows[i]["MedUrgNote"].ToString();
         }
         pat=new Patient();
         pat.LName=rawtable.Rows[i]["LName"].ToString();
         pat.FName=rawtable.Rows[i]["FName"].ToString();
         pat.Preferred=rawtable.Rows[i]["Preferred"].ToString();
         row["nameF"]=pat.GetNameFirstOrPreferred();
         row["nameFL"]=pat.GetNameFirstOrPrefL();
//.........這裏部分代碼省略.........
開發者ID:nampn,項目名稱:ODental,代碼行數:101,代碼來源:Appointments.cs

示例2: FillFieldsForLabelAppointment

 private static void FillFieldsForLabelAppointment(Sheet sheet,Appointment appt,Patient pat)
 {
     foreach(SheetField field in sheet.SheetFields) {
         switch(field.FieldName) {
             case "nameFL":
                 field.FieldValue=pat.GetNameFirstOrPrefL();
                 break;
             case "nameLF":
                 field.FieldValue=pat.GetNameLF();
                 break;
             case "weekdayDateTime":
                 field.FieldValue=appt.AptDateTime.ToString("ddd")+"   "
                     +appt.AptDateTime.ToShortDateString()+"  "
                     +appt.AptDateTime.ToShortTimeString();//  h:mm tt");
                 break;
             case "length":
                 int minutesTotal=appt.Pattern.Length*5;
                 int hours=minutesTotal/60;//automatically rounds down
                 int minutes=minutesTotal-hours*60;
                 field.FieldValue="";
                 if(hours>0){
                     field.FieldValue=hours.ToString()+" hours, ";
                 }
                 field.FieldValue+=minutes.ToString()+" min";
                 break;
         }
     }
 }
開發者ID:nampn,項目名稱:ODental,代碼行數:28,代碼來源:SheetFiller.cs

示例3: GetConfirmList


//.........這裏部分代碼省略.........
            }
            else if(!showRecall && !showNonRecall && showHygPresched) {//Show hygiene prescheduled only (the All option was not selected)
                //Example: LogDateTime="2014-11-26 13:00".  Filter is 11-26, giving "2014-11-27 00:00" to compare against.  This captures all times for 11-26.
                string aptDateSql="";
                if(DataConnection.DBtype==DatabaseType.MySql) {
                    aptDateSql="DATE(appointment.AptDateTime-INTERVAL 2 MONTH)";
                }
                else {
                    aptDateSql="ADD_MONTHS(TO_CHAR(appointment.AptDateTime,'MM/DD/YYYY %HH24:%MI:%SS'),-2)";
                }
                command+="AND (securitylog.PatNum IS NULL OR securitylog.LogDateTime < "+aptDateSql+") ";
            }
            command+="ORDER BY AptDateTime";
            DataTable rawtable=Db.GetTable(command);
            DateTime dateT;
            DateTime timeAskedToArrive;
            Patient pat;
            ContactMethod contmeth;
            for(int i=0;i<rawtable.Rows.Count;i++) {
                row=table.NewRow();
                row["AddrNote"]=rawtable.Rows[i]["AddrNote"].ToString();
                row["AptNum"]=rawtable.Rows[i]["AptNum"].ToString();
                row["age"]=Patients.DateToAge(PIn.Date(rawtable.Rows[i]["Birthdate"].ToString())).ToString();//we don't care about m/y.
                dateT=PIn.DateT(rawtable.Rows[i]["AptDateTime"].ToString());
                timeAskedToArrive=PIn.DateT(rawtable.Rows[i]["DateTimeAskedToArrive"].ToString());
                if(timeAskedToArrive.Year>1880) {
                    dateT=timeAskedToArrive;
                }
                row["AptDateTime"]=dateT;
                row["aptDateTime"]=dateT.ToShortDateString()+"\r\n"+dateT.ToShortTimeString();
                row["ClinicNum"]=rawtable.Rows[i]["ClinicNum"].ToString();
                row["confirmed"]=DefC.GetName(DefCat.ApptConfirmed,PIn.Long(rawtable.Rows[i]["Confirmed"].ToString()));
                contmeth=(ContactMethod)PIn.Int(rawtable.Rows[i]["PreferConfirmMethod"].ToString());
                if(contmeth==ContactMethod.None || contmeth==ContactMethod.HmPhone) {
                    row["contactMethod"]=Lans.g("FormConfirmList","Hm:")+rawtable.Rows[i]["HmPhone"].ToString();
                }
                if(contmeth==ContactMethod.WkPhone) {
                    row["contactMethod"]=Lans.g("FormConfirmList","Wk:")+rawtable.Rows[i]["WkPhone"].ToString();
                }
                if(contmeth==ContactMethod.WirelessPh) {
                    row["contactMethod"]=Lans.g("FormConfirmList","Cell:")+rawtable.Rows[i]["WirelessPhone"].ToString();
                }
                if(contmeth==ContactMethod.TextMessage) {
                    row["contactMethod"]=Lans.g("FormConfirmList","Text:")+rawtable.Rows[i]["WirelessPhone"].ToString();
                }
                if(contmeth==ContactMethod.Email) {
                    row["contactMethod"]=rawtable.Rows[i]["Email"].ToString();
                }
                if(contmeth==ContactMethod.DoNotCall || contmeth==ContactMethod.SeeNotes) {
                    row["contactMethod"]=Lans.g("enumContactMethod",contmeth.ToString());
                }
                row["dateSched"]="Unknown";
                if(rawtable.Rows[i]["LogDateTime"].ToString().Length>0) {
                    row["dateSched"]=rawtable.Rows[i]["LogDateTime"].ToString();
                }
                if(rawtable.Rows[i]["Email"].ToString()=="" && rawtable.Rows[i]["guarEmail"].ToString()!="") {
                    row["email"]=rawtable.Rows[i]["guarEmail"].ToString();
                }
                else {
                    row["email"]=rawtable.Rows[i]["Email"].ToString();
                }
                row["Guarantor"]=rawtable.Rows[i]["Guarantor"].ToString();
                row["medNotes"]="";
                if(rawtable.Rows[i]["Premed"].ToString()=="1"){
                    row["medNotes"]=Lans.g("FormConfirmList","Premedicate");
                }
                if(rawtable.Rows[i]["MedUrgNote"].ToString()!=""){
                    if(row["medNotes"].ToString()!="") {
                        row["medNotes"]+="\r\n";
                    }
                    row["medNotes"]+=rawtable.Rows[i]["MedUrgNote"].ToString();
                }
                pat=new Patient();
                pat.LName=rawtable.Rows[i]["LName"].ToString();
                pat.FName=rawtable.Rows[i]["FName"].ToString();
                pat.Preferred=rawtable.Rows[i]["Preferred"].ToString();
                row["nameF"]=pat.GetNameFirstOrPreferred();
                row["nameFL"]=pat.GetNameFirstOrPrefL();
                row["Note"]=rawtable.Rows[i]["Note"].ToString();
                row["patientName"]=	pat.LName+"\r\n";
                if(pat.Preferred!=""){
                    row["patientName"]+="'"+pat.Preferred+"'";
                }
                else{
                    row["patientName"]+=pat.FName;
                }
                row["PatNum"]=rawtable.Rows[i]["PatNum"].ToString();
                row["PreferConfirmMethod"]=rawtable.Rows[i]["PreferConfirmMethod"].ToString();
                row["ProcDescript"]=rawtable.Rows[i]["ProcDescript"].ToString();
                row["TxtMsgOk"]=rawtable.Rows[i]["TxtMsgOk"].ToString();
                row["WirelessPhone"]=rawtable.Rows[i]["WirelessPhone"].ToString();
                rows.Add(row);
            }
            //Array.Sort(orderDate,RecallList);
            //return RecallList;
            for(int i=0;i<rows.Count;i++) {
                table.Rows.Add(rows[i]);
            }
            return table;
        }
開發者ID:mnisl,項目名稱:OD,代碼行數:101,代碼來源:Appointments.cs


注:本文中的OpenDentBusiness.Patient.GetNameFirstOrPrefL方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。