string message = string.Empty;
int result = 0;
entity = new OutpadmRegister();
entity.RegisterID = registerID;
entity.medicalID = medicalID;
entity.CardID = cardID;
entity.GroupID = groupID;
entity.DiagnosisDate = DateTime.Now.Date;
entity.InputTime = DateTime.Now;
entity.DoctorID = doctorID;
entity.State = (int)EnumDataState.Start;
entity.RegisterQuarryState = (int)EnumRegisterRoot.Normal;
entity.DiagnosisState = (int)EnumCureState.Insert;
entity.DiagnosisRoot = 2;
entity.IsFirst = 1;
entity.IsAdd = 1;
entity.IsCure = 0;
entity.IsEmergency = 0;
entity.IsEspecially = 0;
entity.State = 1;
// 临时患者建档
if (name != string.Empty)
{
pat = new PATPatient();
pat.PatientID = patientID;
entity.PatientID =pat.PatientID;
pat.PatientTypeID = "XJ01";
pat.BirthDay = DateTime.Parse(birthDay);
entity.BirthDay = pat.BirthDay;
pat.Name = name;
entity.Name =pat.Name;
pat.SexID = sexID;
entity.SexID = pat.SexID;
pat.CardCode = cardID;
entity.CardID = pat.CardCode;
pat.State = (int)EnumDataState.Start;
pat.VisitState = 0;
pat.FirstTime = DateTime.Now;
pat.LastTime = DateTime.Now;
//DBHelper.Insert<PATPatient>(pat);
}
try { if (entity != null) { result = DBHelper.Insert<OutpadmRegister>(entity); } }
catch (Exception ex) { ex.ToString(); }这个是源码每次执行到result = DBHelper.Insert<OutpadmRegister>(entity);这句就会引发该异常,以检查过entity并非空值。数目与数据库中非空字段数目一至。还请各位高手指点一下
int result = 0;
entity = new OutpadmRegister();
entity.RegisterID = registerID;
entity.medicalID = medicalID;
entity.CardID = cardID;
entity.GroupID = groupID;
entity.DiagnosisDate = DateTime.Now.Date;
entity.InputTime = DateTime.Now;
entity.DoctorID = doctorID;
entity.State = (int)EnumDataState.Start;
entity.RegisterQuarryState = (int)EnumRegisterRoot.Normal;
entity.DiagnosisState = (int)EnumCureState.Insert;
entity.DiagnosisRoot = 2;
entity.IsFirst = 1;
entity.IsAdd = 1;
entity.IsCure = 0;
entity.IsEmergency = 0;
entity.IsEspecially = 0;
entity.State = 1;
// 临时患者建档
if (name != string.Empty)
{
pat = new PATPatient();
pat.PatientID = patientID;
entity.PatientID =pat.PatientID;
pat.PatientTypeID = "XJ01";
pat.BirthDay = DateTime.Parse(birthDay);
entity.BirthDay = pat.BirthDay;
pat.Name = name;
entity.Name =pat.Name;
pat.SexID = sexID;
entity.SexID = pat.SexID;
pat.CardCode = cardID;
entity.CardID = pat.CardCode;
pat.State = (int)EnumDataState.Start;
pat.VisitState = 0;
pat.FirstTime = DateTime.Now;
pat.LastTime = DateTime.Now;
//DBHelper.Insert<PATPatient>(pat);
}
try { if (entity != null) { result = DBHelper.Insert<OutpadmRegister>(entity); } }
catch (Exception ex) { ex.ToString(); }这个是源码每次执行到result = DBHelper.Insert<OutpadmRegister>(entity);这句就会引发该异常,以检查过entity并非空值。数目与数据库中非空字段数目一至。还请各位高手指点一下
解决方案 »
- 谁可以推荐以下代替vs编程的C#工具?
- sdaf;adsfad;dd;dee;ddd; 删除;号时删除前面的字符 例如删除第3个;就删除dd;
- c#richtextbox控件的滚动条上有什么方法能添加tiptext提示
- 请问windows系统栏右下角的系统日期和时间设置里面的textBox是如何实现它的功能的?
- DataGridViewTextBoxColumn 没绑定进行统计问题
- Asp.Net,程序更新后,IIS频繁出现错误!求助哥们们!
- c#读取windows2000服务器版下active directory问题
- MSN网站怎么有些用Java来写呀??
- 谁有visual studio.net C#网络编程的教程?
- 问两个小问题哈,在webservice被调用的时候,其本身不能被改写,那如果一个webservice被实际使用了不是永远无法维护?怎么关闭呢?拔线?
- 英文日期转为数字日期问题。
- 关于Sql分组的语句
private static Gateway CreateGateway()
{
try
{
string[] str = Base.Split(System.Configuration.ConfigurationManager.AppSettings["Sql"],"|");
DbProvider dp = new NBear.Data.SqlServer.SqlDbProvider(String.Format("Server={0};Database={1};Uid={2};Pwd={3}", str[0], str[1], str[2], str[3]));
Database db = new Database(dp);
return tGateway = new Gateway(db);
}
catch (Exception ex)
{
throw ex;
}
}