修改drug_info表中drug_id为字符型,注释homewindowviewmodel中温度查询定时
This commit is contained in:
parent
3f40aa0f35
commit
b39419bf65
|
@ -3,7 +3,7 @@
|
||||||
<connectionStrings>
|
<connectionStrings>
|
||||||
<!-- 数据库连接字符串 -->
|
<!-- 数据库连接字符串 -->
|
||||||
<!--<add name="database" connectionString="server=127.0.0.1;database=wpf_dm_program;userid=root;password=qq1223" />-->
|
<!--<add name="database" connectionString="server=127.0.0.1;database=wpf_dm_program;userid=root;password=qq1223" />-->
|
||||||
<add name="database" connectionString="server=127.0.0.1;port=3306;database=xichang_db;userid=root;password=root" />
|
<add name="database" connectionString="server=127.0.0.1;port=3306;database=xichang_db_xianchang;userid=root;password=root" />
|
||||||
</connectionStrings>
|
</connectionStrings>
|
||||||
<!--<runtime>
|
<!--<runtime>
|
||||||
--><!--配置之后,Appdomain.CurrentDomain.UnhandledException 事件的 IsTerminating 就变成了 false 啦!也就是说,程序并不会因为这次的异常而崩溃退出。--><!--
|
--><!--配置之后,Appdomain.CurrentDomain.UnhandledException 事件的 IsTerminating 就变成了 false 啦!也就是说,程序并不会因为这次的异常而崩溃退出。--><!--
|
||||||
|
@ -16,7 +16,7 @@
|
||||||
<!--2023/7/13 药房代码 有则写无则空 -->
|
<!--2023/7/13 药房代码 有则写无则空 -->
|
||||||
<add key="storage" value="" />
|
<add key="storage" value="" />
|
||||||
<!-- 登录模式 1单人登录2双人登录 -->
|
<!-- 登录模式 1单人登录2双人登录 -->
|
||||||
<add key="loginMode" value="2" />
|
<add key="loginMode" value="1" />
|
||||||
<!-- 登录顺序,指定先登录的人的名称有效值,只有在登录模式等于2时才会生效; 发药人:【operator】审核人:【reviewer】 -->
|
<!-- 登录顺序,指定先登录的人的名称有效值,只有在登录模式等于2时才会生效; 发药人:【operator】审核人:【reviewer】 -->
|
||||||
<add key="firstLogin" value="operator" />
|
<add key="firstLogin" value="operator" />
|
||||||
<!-- 按处方还药或者按取药记录还药 1:处方(ReturnDrugWindow2)2:药品(ReturnDrugWindow)-->
|
<!-- 按处方还药或者按取药记录还药 1:处方(ReturnDrugWindow2)2:药品(ReturnDrugWindow)-->
|
||||||
|
|
|
@ -19,7 +19,7 @@ namespace DM_Weight.Models
|
||||||
/// ҩƷID
|
/// ҩƷID
|
||||||
///</summary>
|
///</summary>
|
||||||
[SugarColumn(ColumnName = "drug_id", IsPrimaryKey = true)]
|
[SugarColumn(ColumnName = "drug_id", IsPrimaryKey = true)]
|
||||||
public long DrugId { get; set; }
|
public string DrugId { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// ƴ
|
/// ƴ
|
||||||
///</summary>
|
///</summary>
|
||||||
|
|
|
@ -356,12 +356,15 @@ namespace DM_Weight.ViewModels
|
||||||
.Where(cs => cs.DrugId != null)
|
.Where(cs => cs.DrugId != null)
|
||||||
.OrderBy(cs => cs.ColNo)
|
.OrderBy(cs => cs.ColNo)
|
||||||
.ToList();
|
.ToList();
|
||||||
|
if (queryData != null && queryData.Count > 0)
|
||||||
|
{
|
||||||
ChannelStocks = queryData.Select(cs =>
|
ChannelStocks = queryData.Select(cs =>
|
||||||
{
|
{
|
||||||
cs.drugManuNo = cs.DrugInfo.DrugManuNos.Find(it => it.ManuNo.Equals(cs.ManuNo));
|
cs.drugManuNo = cs.DrugInfo.DrugManuNos.Find(it => it.ManuNo.Equals(cs.ManuNo));
|
||||||
return cs;
|
return cs;
|
||||||
}).ToList();
|
}).ToList();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//接收导航传过来的参数 现在是在此处初始化了表格数据
|
//接收导航传过来的参数 现在是在此处初始化了表格数据
|
||||||
public void OnNavigatedTo(NavigationContext navigationContext)
|
public void OnNavigatedTo(NavigationContext navigationContext)
|
||||||
|
|
|
@ -201,7 +201,7 @@ namespace DM_Weight.ViewModels
|
||||||
{
|
{
|
||||||
SqlSugarHelper.Db.Updateable(SelectedDrug).UpdateColumns(d => new { d.DrugName, d.Manufactory, d.PyCode, d.PackUnit, d.MaxStock, d.DrugSpec }).ExecuteCommand();
|
SqlSugarHelper.Db.Updateable(SelectedDrug).UpdateColumns(d => new { d.DrugName, d.Manufactory, d.PyCode, d.PackUnit, d.MaxStock, d.DrugSpec }).ExecuteCommand();
|
||||||
RequestData();
|
RequestData();
|
||||||
}, () => SelectedDrug.DrugId > 0).ObservesProperty(() => SelectedDrug);
|
}, () => SelectedDrug.DrugId is not null).ObservesProperty(() => SelectedDrug);
|
||||||
}
|
}
|
||||||
|
|
||||||
public DelegateCommand AddManuCommand
|
public DelegateCommand AddManuCommand
|
||||||
|
@ -217,7 +217,7 @@ namespace DM_Weight.ViewModels
|
||||||
GetManuNos();
|
GetManuNos();
|
||||||
}
|
}
|
||||||
|
|
||||||
}, () => SelectedDrug.DrugId > 0).ObservesProperty(() => SelectedDrug);
|
}, () => SelectedDrug.DrugId is not null).ObservesProperty(() => SelectedDrug);
|
||||||
}
|
}
|
||||||
|
|
||||||
public DelegateCommand EditManuCommand
|
public DelegateCommand EditManuCommand
|
||||||
|
|
|
@ -394,20 +394,20 @@ namespace DM_Weight.ViewModels
|
||||||
};
|
};
|
||||||
timer.Start();
|
timer.Start();
|
||||||
}
|
}
|
||||||
#region 温度查询定时
|
//#region 温度查询定时
|
||||||
int interval = Convert.ToInt32(ConfigurationManager.AppSettings["Interval"]);
|
//int interval = Convert.ToInt32(ConfigurationManager.AppSettings["Interval"]);
|
||||||
if (interval > 0)
|
//if (interval > 0)
|
||||||
{
|
//{
|
||||||
WDTimer = new System.Timers.Timer();
|
// WDTimer = new System.Timers.Timer();
|
||||||
|
|
||||||
WDTimer.Elapsed += new System.Timers.ElapsedEventHandler(GetWD);
|
// WDTimer.Elapsed += new System.Timers.ElapsedEventHandler(GetWD);
|
||||||
WDTimer.Interval = interval;
|
// WDTimer.Interval = interval;
|
||||||
WDTimer.Start();
|
// WDTimer.Start();
|
||||||
//WDTimer.AutoReset = true;
|
// //WDTimer.AutoReset = true;
|
||||||
//WDTimer.Enabled = true;
|
// //WDTimer.Enabled = true;
|
||||||
}
|
//}
|
||||||
#endregion
|
//#endregion
|
||||||
GetWD();
|
//GetWD();
|
||||||
}
|
}
|
||||||
|
|
||||||
//每次导航的时候,该实列用不用重新创建,true是不重新创建,false是重新创建
|
//每次导航的时候,该实列用不用重新创建,true是不重新创建,false是重新创建
|
||||||
|
|
Loading…
Reference in New Issue