• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# OdSqlParameter类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中OdSqlParameter的典型用法代码示例。如果您正苦于以下问题:C# OdSqlParameter类的具体用法?C# OdSqlParameter怎么用?C# OdSqlParameter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



OdSqlParameter类属于命名空间,在下文中一共展示了OdSqlParameter类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Insert

 ///<summary>Inserts one LabPanel into the database.  Provides option to use the existing priKey.</summary>
 internal static long Insert(LabPanel labPanel,bool useExistingPK)
 {
     if(!useExistingPK && PrefC.RandomKeys) {
         labPanel.LabPanelNum=ReplicationServers.GetKey("labpanel","LabPanelNum");
     }
     string command="INSERT INTO labpanel (";
     if(useExistingPK || PrefC.RandomKeys) {
         command+="LabPanelNum,";
     }
     command+="PatNum,RawMessage,LabNameAddress,SpecimenCondition,SpecimenSource,ServiceId,ServiceName,MedicalOrderNum) VALUES(";
     if(useExistingPK || PrefC.RandomKeys) {
         command+=POut.Long(labPanel.LabPanelNum)+",";
     }
     command+=
              POut.Long  (labPanel.PatNum)+","
         +DbHelper.ParamChar+"paramRawMessage,"
         +"'"+POut.String(labPanel.LabNameAddress)+"',"
         //DateTStamp can only be set by MySQL
         +"'"+POut.String(labPanel.SpecimenCondition)+"',"
         +"'"+POut.String(labPanel.SpecimenSource)+"',"
         +"'"+POut.String(labPanel.ServiceId)+"',"
         +"'"+POut.String(labPanel.ServiceName)+"',"
         +    POut.Long  (labPanel.MedicalOrderNum)+")";
     if(labPanel.RawMessage==null) {
         labPanel.RawMessage="";
     }
     OdSqlParameter paramRawMessage=new OdSqlParameter("paramRawMessage",OdDbType.Text,labPanel.RawMessage);
     if(useExistingPK || PrefC.RandomKeys) {
         Db.NonQ(command,paramRawMessage);
     }
     else {
         labPanel.LabPanelNum=Db.NonQ(command,true,paramRawMessage);
     }
     return labPanel.LabPanelNum;
 }
开发者ID:nampn,项目名称:ODental,代码行数:36,代码来源:LabPanelCrud.cs


示例2: Insert

 ///<summary>Inserts one InsSub into the database.  Provides option to use the existing priKey.</summary>
 internal static long Insert(InsSub insSub,bool useExistingPK)
 {
     if(!useExistingPK && PrefC.RandomKeys) {
         insSub.InsSubNum=ReplicationServers.GetKey("inssub","InsSubNum");
     }
     string command="INSERT INTO inssub (";
     if(useExistingPK || PrefC.RandomKeys) {
         command+="InsSubNum,";
     }
     command+="PlanNum,Subscriber,DateEffective,DateTerm,ReleaseInfo,AssignBen,SubscriberID,BenefitNotes,SubscNote) VALUES(";
     if(useExistingPK || PrefC.RandomKeys) {
         command+=POut.Long(insSub.InsSubNum)+",";
     }
     command+=
              POut.Long  (insSub.PlanNum)+","
         +    POut.Long  (insSub.Subscriber)+","
         +    POut.Date  (insSub.DateEffective)+","
         +    POut.Date  (insSub.DateTerm)+","
         +    POut.Bool  (insSub.ReleaseInfo)+","
         +    POut.Bool  (insSub.AssignBen)+","
         +"'"+POut.String(insSub.SubscriberID)+"',"
         +DbHelper.ParamChar+"paramBenefitNotes,"
         +"'"+POut.String(insSub.SubscNote)+"')";
     if(insSub.BenefitNotes==null) {
         insSub.BenefitNotes="";
     }
     OdSqlParameter paramBenefitNotes=new OdSqlParameter("paramBenefitNotes",OdDbType.Text,insSub.BenefitNotes);
     if(useExistingPK || PrefC.RandomKeys) {
         Db.NonQ(command,paramBenefitNotes);
     }
     else {
         insSub.InsSubNum=Db.NonQ(command,true,paramBenefitNotes);
     }
     return insSub.InsSubNum;
 }
开发者ID:nampn,项目名称:ODental,代码行数:36,代码来源:InsSubCrud.cs


示例3: Insert

 ///<summary>Inserts one EtransMessageText into the database.  Provides option to use the existing priKey.</summary>
 internal static long Insert(EtransMessageText etransMessageText,bool useExistingPK)
 {
     if(!useExistingPK && PrefC.RandomKeys) {
         etransMessageText.EtransMessageTextNum=ReplicationServers.GetKey("etransmessagetext","EtransMessageTextNum");
     }
     string command="INSERT INTO etransmessagetext (";
     if(useExistingPK || PrefC.RandomKeys) {
         command+="EtransMessageTextNum,";
     }
     command+="MessageText) VALUES(";
     if(useExistingPK || PrefC.RandomKeys) {
         command+=POut.Long(etransMessageText.EtransMessageTextNum)+",";
     }
     command+=
          DbHelper.ParamChar+"paramMessageText)";
     if(etransMessageText.MessageText==null) {
         etransMessageText.MessageText="";
     }
     OdSqlParameter paramMessageText=new OdSqlParameter("paramMessageText",OdDbType.Text,etransMessageText.MessageText);
     if(useExistingPK || PrefC.RandomKeys) {
         Db.NonQ(command,paramMessageText);
     }
     else {
         etransMessageText.EtransMessageTextNum=Db.NonQ(command,true,paramMessageText);
     }
     return etransMessageText.EtransMessageTextNum;
 }
开发者ID:nampn,项目名称:ODental,代码行数:28,代码来源:EtransMessageTextCrud.cs


示例4: Insert

 ///<summary>Inserts one EobAttach into the database.  Provides option to use the existing priKey.</summary>
 internal static long Insert(EobAttach eobAttach,bool useExistingPK)
 {
     if(!useExistingPK && PrefC.RandomKeys) {
         eobAttach.EobAttachNum=ReplicationServers.GetKey("eobattach","EobAttachNum");
     }
     string command="INSERT INTO eobattach (";
     if(useExistingPK || PrefC.RandomKeys) {
         command+="EobAttachNum,";
     }
     command+="ClaimPaymentNum,DateTCreated,FileName,RawBase64) VALUES(";
     if(useExistingPK || PrefC.RandomKeys) {
         command+=POut.Long(eobAttach.EobAttachNum)+",";
     }
     command+=
              POut.Long  (eobAttach.ClaimPaymentNum)+","
         +    POut.DateT (eobAttach.DateTCreated)+","
         +"'"+POut.String(eobAttach.FileName)+"',"
         +DbHelper.ParamChar+"paramRawBase64)";
     if(eobAttach.RawBase64==null) {
         eobAttach.RawBase64="";
     }
     OdSqlParameter paramRawBase64=new OdSqlParameter("paramRawBase64",OdDbType.Text,eobAttach.RawBase64);
     if(useExistingPK || PrefC.RandomKeys) {
         Db.NonQ(command,paramRawBase64);
     }
     else {
         eobAttach.EobAttachNum=Db.NonQ(command,true,paramRawBase64);
     }
     return eobAttach.EobAttachNum;
 }
开发者ID:nampn,项目名称:ODental,代码行数:31,代码来源:EobAttachCrud.cs


示例5: Insert

 ///<summary>Inserts one ProcButton into the database.  Provides option to use the existing priKey.</summary>
 internal static long Insert(ProcButton procButton,bool useExistingPK)
 {
     if(!useExistingPK && PrefC.RandomKeys) {
         procButton.ProcButtonNum=ReplicationServers.GetKey("procbutton","ProcButtonNum");
     }
     string command="INSERT INTO procbutton (";
     if(useExistingPK || PrefC.RandomKeys) {
         command+="ProcButtonNum,";
     }
     command+="Description,ItemOrder,Category,ButtonImage) VALUES(";
     if(useExistingPK || PrefC.RandomKeys) {
         command+=POut.Long(procButton.ProcButtonNum)+",";
     }
     command+=
          "'"+POut.String(procButton.Description)+"',"
         +    POut.Int   (procButton.ItemOrder)+","
         +    POut.Long  (procButton.Category)+","
         +DbHelper.ParamChar+"paramButtonImage)";
     if(procButton.ButtonImage==null) {
         procButton.ButtonImage="";
     }
     OdSqlParameter paramButtonImage=new OdSqlParameter("paramButtonImage",OdDbType.Text,procButton.ButtonImage);
     if(useExistingPK || PrefC.RandomKeys) {
         Db.NonQ(command,paramButtonImage);
     }
     else {
         procButton.ProcButtonNum=Db.NonQ(command,true,paramButtonImage);
     }
     return procButton.ProcButtonNum;
 }
开发者ID:nampn,项目名称:ODental,代码行数:31,代码来源:ProcButtonCrud.cs


示例6: Insert

 ///<summary>Inserts one SigElementDef into the database.  Provides option to use the existing priKey.</summary>
 internal static long Insert(SigElementDef sigElementDef,bool useExistingPK)
 {
     if(!useExistingPK && PrefC.RandomKeys) {
         sigElementDef.SigElementDefNum=ReplicationServers.GetKey("sigelementdef","SigElementDefNum");
     }
     string command="INSERT INTO sigelementdef (";
     if(useExistingPK || PrefC.RandomKeys) {
         command+="SigElementDefNum,";
     }
     command+="LightRow,LightColor,SigElementType,SigText,Sound,ItemOrder) VALUES(";
     if(useExistingPK || PrefC.RandomKeys) {
         command+=POut.Long(sigElementDef.SigElementDefNum)+",";
     }
     command+=
              POut.Byte  (sigElementDef.LightRow)+","
         +    POut.Int   (sigElementDef.LightColor.ToArgb())+","
         +    POut.Int   ((int)sigElementDef.SigElementType)+","
         +"'"+POut.String(sigElementDef.SigText)+"',"
         +DbHelper.ParamChar+"paramSound,"
         +    POut.Int   (sigElementDef.ItemOrder)+")";
     if(sigElementDef.Sound==null) {
         sigElementDef.Sound="";
     }
     OdSqlParameter paramSound=new OdSqlParameter("paramSound",OdDbType.Text,sigElementDef.Sound);
     if(useExistingPK || PrefC.RandomKeys) {
         Db.NonQ(command,paramSound);
     }
     else {
         sigElementDef.SigElementDefNum=Db.NonQ(command,true,paramSound);
     }
     return sigElementDef.SigElementDefNum;
 }
开发者ID:nampn,项目名称:ODental,代码行数:33,代码来源:SigElementDefCrud.cs


示例7: Insert

 ///<summary>Inserts one Letter into the database.  Provides option to use the existing priKey.</summary>
 internal static long Insert(Letter letter,bool useExistingPK)
 {
     if(!useExistingPK && PrefC.RandomKeys) {
         letter.LetterNum=ReplicationServers.GetKey("letter","LetterNum");
     }
     string command="INSERT INTO letter (";
     if(useExistingPK || PrefC.RandomKeys) {
         command+="LetterNum,";
     }
     command+="Description,BodyText) VALUES(";
     if(useExistingPK || PrefC.RandomKeys) {
         command+=POut.Long(letter.LetterNum)+",";
     }
     command+=
          "'"+POut.String(letter.Description)+"',"
         +DbHelper.ParamChar+"paramBodyText)";
     if(letter.BodyText==null) {
         letter.BodyText="";
     }
     OdSqlParameter paramBodyText=new OdSqlParameter("paramBodyText",OdDbType.Text,letter.BodyText);
     if(useExistingPK || PrefC.RandomKeys) {
         Db.NonQ(command,paramBodyText);
     }
     else {
         letter.LetterNum=Db.NonQ(command,true,paramBodyText);
     }
     return letter.LetterNum;
 }
开发者ID:nampn,项目名称:ODental,代码行数:29,代码来源:LetterCrud.cs


示例8: Insert

 ///<summary>Inserts one PatientNote into the database.  Provides option to use the existing priKey.</summary>
 internal static long Insert(PatientNote patientNote,bool useExistingPK)
 {
     if(!useExistingPK && PrefC.RandomKeys) {
         patientNote.PatNum=ReplicationServers.GetKey("patientnote","PatNum");
     }
     string command="INSERT INTO patientnote (";
     if(useExistingPK || PrefC.RandomKeys) {
         command+="PatNum,";
     }
     command+="FamFinancial,ApptPhone,Medical,Service,MedicalComp,Treatment) VALUES(";
     if(useExistingPK || PrefC.RandomKeys) {
         command+=POut.Long(patientNote.PatNum)+",";
     }
     command+=
          "'"+POut.String(patientNote.FamFinancial)+"',"
         +"'"+POut.String(patientNote.ApptPhone)+"',"
         +"'"+POut.String(patientNote.Medical)+"',"
         +"'"+POut.String(patientNote.Service)+"',"
         +DbHelper.ParamChar+"paramMedicalComp,"
         +"'"+POut.String(patientNote.Treatment)+"')";
     if(patientNote.MedicalComp==null) {
         patientNote.MedicalComp="";
     }
     OdSqlParameter paramMedicalComp=new OdSqlParameter("paramMedicalComp",OdDbType.Text,patientNote.MedicalComp);
     if(useExistingPK || PrefC.RandomKeys) {
         Db.NonQ(command,paramMedicalComp);
     }
     else {
         patientNote.PatNum=Db.NonQ(command,true,paramMedicalComp);
     }
     return patientNote.PatNum;
 }
开发者ID:nampn,项目名称:ODental,代码行数:33,代码来源:PatientNoteCrud.cs


示例9: Insert

 ///<summary>Inserts one UserQuery into the database.  Provides option to use the existing priKey.</summary>
 internal static long Insert(UserQuery userQuery,bool useExistingPK)
 {
     if(!useExistingPK && PrefC.RandomKeys) {
         userQuery.QueryNum=ReplicationServers.GetKey("userquery","QueryNum");
     }
     string command="INSERT INTO userquery (";
     if(useExistingPK || PrefC.RandomKeys) {
         command+="QueryNum,";
     }
     command+="Description,FileName,QueryText) VALUES(";
     if(useExistingPK || PrefC.RandomKeys) {
         command+=POut.Long(userQuery.QueryNum)+",";
     }
     command+=
          "'"+POut.String(userQuery.Description)+"',"
         +"'"+POut.String(userQuery.FileName)+"',"
         +DbHelper.ParamChar+"paramQueryText)";
     if(userQuery.QueryText==null) {
         userQuery.QueryText="";
     }
     OdSqlParameter paramQueryText=new OdSqlParameter("paramQueryText",OdDbType.Text,userQuery.QueryText);
     if(useExistingPK || PrefC.RandomKeys) {
         Db.NonQ(command,paramQueryText);
     }
     else {
         userQuery.QueryNum=Db.NonQ(command,true,paramQueryText);
     }
     return userQuery.QueryNum;
 }
开发者ID:nampn,项目名称:ODental,代码行数:30,代码来源:UserQueryCrud.cs


示例10: Insert

 ///<summary>Inserts one EhrSummaryCcd into the database.  Provides option to use the existing priKey.</summary>
 internal static long Insert(EhrSummaryCcd ehrSummaryCcd,bool useExistingPK)
 {
     if(!useExistingPK && PrefC.RandomKeys) {
         ehrSummaryCcd.EhrSummaryCcdNum=ReplicationServers.GetKey("ehrsummaryccd","EhrSummaryCcdNum");
     }
     string command="INSERT INTO ehrsummaryccd (";
     if(useExistingPK || PrefC.RandomKeys) {
         command+="EhrSummaryCcdNum,";
     }
     command+="PatNum,DateSummary,ContentSummary) VALUES(";
     if(useExistingPK || PrefC.RandomKeys) {
         command+=POut.Long(ehrSummaryCcd.EhrSummaryCcdNum)+",";
     }
     command+=
              POut.Long  (ehrSummaryCcd.PatNum)+","
         +    POut.Date  (ehrSummaryCcd.DateSummary)+","
         +DbHelper.ParamChar+"paramContentSummary)";
     if(ehrSummaryCcd.ContentSummary==null) {
         ehrSummaryCcd.ContentSummary="";
     }
     OdSqlParameter paramContentSummary=new OdSqlParameter("paramContentSummary",OdDbType.Text,ehrSummaryCcd.ContentSummary);
     if(useExistingPK || PrefC.RandomKeys) {
         Db.NonQ(command,paramContentSummary);
     }
     else {
         ehrSummaryCcd.EhrSummaryCcdNum=Db.NonQ(command,true,paramContentSummary);
     }
     return ehrSummaryCcd.EhrSummaryCcdNum;
 }
开发者ID:nampn,项目名称:ODental,代码行数:30,代码来源:EhrSummaryCcdCrud.cs


示例11: Insert

 ///<summary>Inserts one ProcNote into the database.  Provides option to use the existing priKey.</summary>
 internal static long Insert(ProcNote procNote,bool useExistingPK)
 {
     if(!useExistingPK && PrefC.RandomKeys) {
         procNote.ProcNoteNum=ReplicationServers.GetKey("procnote","ProcNoteNum");
     }
     string command="INSERT INTO procnote (";
     if(useExistingPK || PrefC.RandomKeys) {
         command+="ProcNoteNum,";
     }
     command+="PatNum,ProcNum,EntryDateTime,UserNum,Note,SigIsTopaz,Signature) VALUES(";
     if(useExistingPK || PrefC.RandomKeys) {
         command+=POut.Long(procNote.ProcNoteNum)+",";
     }
     command+=
              POut.Long  (procNote.PatNum)+","
         +    POut.Long  (procNote.ProcNum)+","
         +    DbHelper.Now()+","
         +    POut.Long  (procNote.UserNum)+","
         +DbHelper.ParamChar+"paramNote,"
         +    POut.Bool  (procNote.SigIsTopaz)+","
         +"'"+POut.String(procNote.Signature)+"')";
     if(procNote.Note==null) {
         procNote.Note="";
     }
     OdSqlParameter paramNote=new OdSqlParameter("paramNote",OdDbType.Text,procNote.Note);
     if(useExistingPK || PrefC.RandomKeys) {
         Db.NonQ(command,paramNote);
     }
     else {
         procNote.ProcNoteNum=Db.NonQ(command,true,paramNote);
     }
     return procNote.ProcNoteNum;
 }
开发者ID:nampn,项目名称:ODental,代码行数:34,代码来源:ProcNoteCrud.cs


示例12: Insert

 ///<summary>Inserts one HL7Msg into the database.  Provides option to use the existing priKey.</summary>
 internal static long Insert(HL7Msg hL7Msg,bool useExistingPK)
 {
     if(!useExistingPK && PrefC.RandomKeys) {
         hL7Msg.HL7MsgNum=ReplicationServers.GetKey("hl7msg","HL7MsgNum");
     }
     string command="INSERT INTO hl7msg (";
     if(useExistingPK || PrefC.RandomKeys) {
         command+="HL7MsgNum,";
     }
     command+="HL7Status,MsgText,AptNum) VALUES(";
     if(useExistingPK || PrefC.RandomKeys) {
         command+=POut.Long(hL7Msg.HL7MsgNum)+",";
     }
     command+=
              POut.Int   ((int)hL7Msg.HL7Status)+","
         +DbHelper.ParamChar+"paramMsgText,"
         +    POut.Long  (hL7Msg.AptNum)+")";
     if(hL7Msg.MsgText==null) {
         hL7Msg.MsgText="";
     }
     OdSqlParameter paramMsgText=new OdSqlParameter("paramMsgText",OdDbType.Text,hL7Msg.MsgText);
     if(useExistingPK || PrefC.RandomKeys) {
         Db.NonQ(command,paramMsgText);
     }
     else {
         hL7Msg.HL7MsgNum=Db.NonQ(command,true,paramMsgText);
     }
     return hL7Msg.HL7MsgNum;
 }
开发者ID:nampn,项目名称:ODental,代码行数:30,代码来源:HL7MsgCrud.cs


示例13: Insert

		///<summary>Usually set useExistingPK=true.  Inserts one Documentm into the database.</summary>
		internal static long Insert(Documentm documentm,bool useExistingPK){
			if(!useExistingPK) {
				documentm.DocNum=ReplicationServers.GetKey("documentm","DocNum");
			}
			string command="INSERT INTO documentm (";
			command+="DocNum,";
			command+="CustomerNum,PatNum,RawBase64) VALUES(";
			command+=POut.Long(documentm.DocNum)+",";
			command+=
				     POut.Long  (documentm.CustomerNum)+","
				+    POut.Long  (documentm.PatNum)+","
				+DbHelper.ParamChar+"paramRawBase64)";
			if(documentm.RawBase64==null) {
				documentm.RawBase64="";
			}
			OdSqlParameter paramRawBase64=new OdSqlParameter("paramRawBase64",OdDbType.Text,documentm.RawBase64);
			Db.NonQ(command,paramRawBase64);//There is no autoincrement in the mobile server.
			return documentm.DocNum;
		}
开发者ID:mnisl,项目名称:OD,代码行数:20,代码来源:DocumentmCrud.cs


示例14: Insert

 ///<summary>Inserts one Payment into the database.  Provides option to use the existing priKey.</summary>
 internal static long Insert(Payment payment,bool useExistingPK)
 {
     if(!useExistingPK && PrefC.RandomKeys) {
         payment.PayNum=ReplicationServers.GetKey("payment","PayNum");
     }
     string command="INSERT INTO payment (";
     if(useExistingPK || PrefC.RandomKeys) {
         command+="PayNum,";
     }
     command+="PayType,PayDate,PayAmt,CheckNum,BankBranch,PayNote,IsSplit,PatNum,ClinicNum,DateEntry,DepositNum,Receipt,IsRecurringCC) VALUES(";
     if(useExistingPK || PrefC.RandomKeys) {
         command+=POut.Long(payment.PayNum)+",";
     }
     command+=
              POut.Long  (payment.PayType)+","
         +    POut.Date  (payment.PayDate)+","
         +"'"+POut.Double(payment.PayAmt)+"',"
         +"'"+POut.String(payment.CheckNum)+"',"
         +"'"+POut.String(payment.BankBranch)+"',"
         +"'"+POut.String(payment.PayNote)+"',"
         +    POut.Bool  (payment.IsSplit)+","
         +    POut.Long  (payment.PatNum)+","
         +    POut.Long  (payment.ClinicNum)+","
         +    DbHelper.Now()+","
         +    POut.Long  (payment.DepositNum)+","
         +DbHelper.ParamChar+"paramReceipt,"
         +    POut.Bool  (payment.IsRecurringCC)+")";
     if(payment.Receipt==null) {
         payment.Receipt="";
     }
     OdSqlParameter paramReceipt=new OdSqlParameter("paramReceipt",OdDbType.Text,payment.Receipt);
     if(useExistingPK || PrefC.RandomKeys) {
         Db.NonQ(command,paramReceipt);
     }
     else {
         payment.PayNum=Db.NonQ(command,true,paramReceipt);
     }
     return payment.PayNum;
 }
开发者ID:nampn,项目名称:ODental,代码行数:40,代码来源:PaymentCrud.cs


示例15: Insert

 ///<summary>Inserts one Task into the database.  Provides option to use the existing priKey.</summary>
 internal static long Insert(Task task,bool useExistingPK)
 {
     if(!useExistingPK && PrefC.RandomKeys) {
         task.TaskNum=ReplicationServers.GetKey("task","TaskNum");
     }
     string command="INSERT INTO task (";
     if(useExistingPK || PrefC.RandomKeys) {
         command+="TaskNum,";
     }
     command+="TaskListNum,DateTask,KeyNum,Descript,TaskStatus,IsRepeating,DateType,FromNum,ObjectType,DateTimeEntry,UserNum,DateTimeFinished) VALUES(";
     if(useExistingPK || PrefC.RandomKeys) {
         command+=POut.Long(task.TaskNum)+",";
     }
     command+=
              POut.Long  (task.TaskListNum)+","
         +    POut.Date  (task.DateTask)+","
         +    POut.Long  (task.KeyNum)+","
         +DbHelper.ParamChar+"paramDescript,"
         +    POut.Int   ((int)task.TaskStatus)+","
         +    POut.Bool  (task.IsRepeating)+","
         +    POut.Int   ((int)task.DateType)+","
         +    POut.Long  (task.FromNum)+","
         +    POut.Int   ((int)task.ObjectType)+","
         +    POut.DateT (task.DateTimeEntry)+","
         +    POut.Long  (task.UserNum)+","
         +    POut.DateT (task.DateTimeFinished)+")";
     if(task.Descript==null) {
         task.Descript="";
     }
     OdSqlParameter paramDescript=new OdSqlParameter("paramDescript",OdDbType.Text,task.Descript);
     if(useExistingPK || PrefC.RandomKeys) {
         Db.NonQ(command,paramDescript);
     }
     else {
         task.TaskNum=Db.NonQ(command,true,paramDescript);
     }
     return task.TaskNum;
 }
开发者ID:nampn,项目名称:ODental,代码行数:39,代码来源:TaskCrud.cs


示例16: Update

 ///<summary>Updates one Document in the database.  Uses an old object to compare to, and only alters changed fields.  This prevents collisions and concurrency problems in heavily used tables.</summary>
 internal static void Update(Document document,Document oldDocument)
 {
     string command="";
     if(document.Description != oldDocument.Description) {
         if(command!=""){ command+=",";}
         command+="Description = '"+POut.String(document.Description)+"'";
     }
     if(document.DateCreated != oldDocument.DateCreated) {
         if(command!=""){ command+=",";}
         command+="DateCreated = "+POut.Date(document.DateCreated)+"";
     }
     if(document.DocCategory != oldDocument.DocCategory) {
         if(command!=""){ command+=",";}
         command+="DocCategory = "+POut.Long(document.DocCategory)+"";
     }
     if(document.PatNum != oldDocument.PatNum) {
         if(command!=""){ command+=",";}
         command+="PatNum = "+POut.Long(document.PatNum)+"";
     }
     if(document.FileName != oldDocument.FileName) {
         if(command!=""){ command+=",";}
         command+="FileName = '"+POut.String(document.FileName)+"'";
     }
     if(document.ImgType != oldDocument.ImgType) {
         if(command!=""){ command+=",";}
         command+="ImgType = "+POut.Int   ((int)document.ImgType)+"";
     }
     if(document.IsFlipped != oldDocument.IsFlipped) {
         if(command!=""){ command+=",";}
         command+="IsFlipped = "+POut.Bool(document.IsFlipped)+"";
     }
     if(document.DegreesRotated != oldDocument.DegreesRotated) {
         if(command!=""){ command+=",";}
         command+="DegreesRotated = "+POut.Int(document.DegreesRotated)+"";
     }
     if(document.ToothNumbers != oldDocument.ToothNumbers) {
         if(command!=""){ command+=",";}
         command+="ToothNumbers = '"+POut.String(document.ToothNumbers)+"'";
     }
     if(document.Note != oldDocument.Note) {
         if(command!=""){ command+=",";}
         command+="Note = '"+POut.String(document.Note)+"'";
     }
     if(document.SigIsTopaz != oldDocument.SigIsTopaz) {
         if(command!=""){ command+=",";}
         command+="SigIsTopaz = "+POut.Bool(document.SigIsTopaz)+"";
     }
     if(document.Signature != oldDocument.Signature) {
         if(command!=""){ command+=",";}
         command+="Signature = '"+POut.String(document.Signature)+"'";
     }
     if(document.CropX != oldDocument.CropX) {
         if(command!=""){ command+=",";}
         command+="CropX = "+POut.Int(document.CropX)+"";
     }
     if(document.CropY != oldDocument.CropY) {
         if(command!=""){ command+=",";}
         command+="CropY = "+POut.Int(document.CropY)+"";
     }
     if(document.CropW != oldDocument.CropW) {
         if(command!=""){ command+=",";}
         command+="CropW = "+POut.Int(document.CropW)+"";
     }
     if(document.CropH != oldDocument.CropH) {
         if(command!=""){ command+=",";}
         command+="CropH = "+POut.Int(document.CropH)+"";
     }
     if(document.WindowingMin != oldDocument.WindowingMin) {
         if(command!=""){ command+=",";}
         command+="WindowingMin = "+POut.Int(document.WindowingMin)+"";
     }
     if(document.WindowingMax != oldDocument.WindowingMax) {
         if(command!=""){ command+=",";}
         command+="WindowingMax = "+POut.Int(document.WindowingMax)+"";
     }
     if(document.MountItemNum != oldDocument.MountItemNum) {
         if(command!=""){ command+=",";}
         command+="MountItemNum = "+POut.Long(document.MountItemNum)+"";
     }
     //DateTStamp can only be set by MySQL
     if(document.RawBase64 != oldDocument.RawBase64) {
         if(command!=""){ command+=",";}
         command+="RawBase64 = "+DbHelper.ParamChar+"paramRawBase64";
     }
     if(document.Thumbnail != oldDocument.Thumbnail) {
         if(command!=""){ command+=",";}
         command+="Thumbnail = "+DbHelper.ParamChar+"paramThumbnail";
     }
     if(command==""){
         return;
     }
     if(document.RawBase64==null) {
         document.RawBase64="";
     }
     OdSqlParameter paramRawBase64=new OdSqlParameter("paramRawBase64",OdDbType.Text,document.RawBase64);
     if(document.Thumbnail==null) {
         document.Thumbnail="";
     }
     OdSqlParameter paramThumbnail=new OdSqlParameter("paramThumbnail",OdDbType.Text,document.Thumbnail);
//.........这里部分代码省略.........
开发者ID:nampn,项目名称:ODental,代码行数:101,代码来源:DocumentCrud.cs


示例17: Update

 ///<summary>Updates one EtransMessageText in the database.  Uses an old object to compare to, and only alters changed fields.  This prevents collisions and concurrency problems in heavily used tables.</summary>
 internal static void Update(EtransMessageText etransMessageText,EtransMessageText oldEtransMessageText)
 {
     string command="";
     if(etransMessageText.MessageText != oldEtransMessageText.MessageText) {
         if(command!=""){ command+=",";}
         command+="MessageText = "+DbHelper.ParamChar+"paramMessageText";
     }
     if(command==""){
         return;
     }
     if(etransMessageText.MessageText==null) {
         etransMessageText.MessageText="";
     }
     OdSqlParameter paramMessageText=new OdSqlParameter("paramMessageText",OdDbType.Text,etransMessageText.MessageText);
     command="UPDATE etransmessagetext SET "+command
         +" WHERE EtransMessageTextNum = "+POut.Long(etransMessageText.EtransMessageTextNum);
     Db.NonQ(command,paramMessageText);
 }
开发者ID:nampn,项目名称:ODental,代码行数:19,代码来源:EtransMessageTextCrud.cs


示例18: Insert

		///<summary>Inserts one ErxLog into the database.  Provides option to use the existing priKey.</summary>
		public static long Insert(ErxLog erxLog,bool useExistingPK){
			if(!useExistingPK && PrefC.RandomKeys) {
				erxLog.ErxLogNum=ReplicationServers.GetKey("erxlog","ErxLogNum");
			}
			string command="INSERT INTO erxlog (";
			if(useExistingPK || PrefC.RandomKeys) {
				command+="ErxLogNum,";
			}
			command+="PatNum,MsgText,ProvNum) VALUES(";
			if(useExistingPK || PrefC.RandomKeys) {
				command+=POut.Long(erxLog.ErxLogNum)+",";
			}
			command+=
				     POut.Long  (erxLog.PatNum)+","
				+    DbHelper.ParamChar+"paramMsgText,"
				//DateTStamp can only be set by MySQL
				+    POut.Long  (erxLog.ProvNum)+")";
			if(erxLog.MsgText==null) {
				erxLog.MsgText="";
			}
			OdSqlParameter paramMsgText=new OdSqlParameter("paramMsgText",OdDbType.Text,erxLog.MsgText);
			if(useExistingPK || PrefC.RandomKeys) {
				Db.NonQ(command,paramMsgText);
			}
			else {
				erxLog.ErxLogNum=Db.NonQ(command,true,paramMsgText);
			}
			return erxLog.ErxLogNum;
		}
开发者ID:mnisl,项目名称:OD,代码行数:30,代码来源:ErxLogCrud.cs


示例19: Update

		///<summary>Updates one ErxLog in the database.  Uses an old object to compare to, and only alters changed fields.  This prevents collisions and concurrency problems in heavily used tables.  Returns true if an update occurred.</summary>
		public static bool Update(ErxLog erxLog,ErxLog oldErxLog){
			string command="";
			if(erxLog.PatNum != oldErxLog.PatNum) {
				if(command!=""){ command+=",";}
				command+="PatNum = "+POut.Long(erxLog.PatNum)+"";
			}
			if(erxLog.MsgText != oldErxLog.MsgText) {
				if(command!=""){ command+=",";}
				command+="MsgText = "+DbHelper.ParamChar+"paramMsgText";
			}
			//DateTStamp can only be set by MySQL
			if(erxLog.ProvNum != oldErxLog.ProvNum) {
				if(command!=""){ command+=",";}
				command+="ProvNum = "+POut.Long(erxLog.ProvNum)+"";
			}
			if(command==""){
				return false;
			}
			if(erxLog.MsgText==null) {
				erxLog.MsgText="";
			}
			OdSqlParameter paramMsgText=new OdSqlParameter("paramMsgText",OdDbType.Text,erxLog.MsgText);
			command="UPDATE erxlog SET "+command
				+" WHERE ErxLogNum = "+POut.Long(erxLog.ErxLogNum);
			Db.NonQ(command,paramMsgText);
			return true;
		}
开发者ID:mnisl,项目名称:OD,代码行数:28,代码来源:ErxLogCrud.cs


示例20: Update

		///<summary>Updates one PatientNote in the database.  Uses an old object to compare to, and only alters changed fields.  This prevents collisions and concurrency problems in heavily used tables.  Returns true if an update occurred.</summary>
		public static bool Update(PatientNote patientNote,PatientNote oldPatientNote){
			string command="";
			//FamFinancial excluded from update
			if(patientNote.ApptPhone != oldPatientNote.ApptPhone) {
				if(command!=""){ command+=",";}
				command+="ApptPhone = '"+POut.String(patientNote.ApptPhone)+"'";
			}
			if(patientNote.Medical != oldPatientNote.Medical) {
				if(command!=""){ command+=",";}
				command+="Medical = '"+POut.String(patientNote.Medical)+"'";
			}
			if(patientNote.Service != oldPatientNote.Service) {
				if(command!=""){ command+=",";}
				command+="Service = '"+POut.String(patientNote.Service)+"'";
			}
			if(patientNote.MedicalComp != oldPatientNote.MedicalComp) {
				if(command!=""){ command+=",";}
				command+="MedicalComp = "+DbHelper.ParamChar+"paramMedicalComp";
			}
			if(patientNote.Treatment != oldPatientNote.Treatment) {
				if(command!=""){ command+=",";}
				command+="Treatment = '"+POut.String(patientNote.Treatment)+"'";
			}
			if(command==""){
				return false;
			}
			if(patientNote.MedicalComp==null) {
				patientNote.MedicalComp="";
			}
			OdSqlParameter paramMedicalComp=new OdSqlParameter("paramMedicalComp",OdDbType.Text,patientNote.MedicalComp);
			command="UPDATE patientnote SET "+command
				+" WHERE PatNum = "+POut.Long(patientNote.PatNum);
			Db.NonQ(command,paramMedicalComp);
			return true;
		}
开发者ID:mnisl,项目名称:OD,代码行数:36,代码来源:PatientNoteCrud.cs



注:本文中的OdSqlParameter类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Offset类代码示例发布时间:2022-05-24
下一篇:
C# OctreeNode类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap