a
This commit is contained in:
@@ -29,7 +29,7 @@ namespace MonthlyProductionSchedule
|
||||
base.ButtonClick(e);
|
||||
if (e.Key.EqualsIgnoreCase("FSaveDataButton"))
|
||||
{
|
||||
this.View.ShowMessage("生成数据会覆盖当月历史数据,是否继续?", MessageBoxOptions.OKCancel, new Action<MessageBoxResult>(result =>
|
||||
this.View.ShowMessage("生成数据会覆盖该月历史数据,是否继续?", MessageBoxOptions.OKCancel, new Action<MessageBoxResult>(result =>
|
||||
{
|
||||
if (result == MessageBoxResult.OK)
|
||||
{
|
||||
@@ -44,8 +44,7 @@ namespace MonthlyProductionSchedule
|
||||
var startDate = date.ToString("yyyy-MM-dd");
|
||||
var endDate = date.AddMonths(1).AddDays(-1).ToString("yyyy-MM-dd");
|
||||
var tableName = this.SysReportView.Model.DataSource.TableName;
|
||||
//para.Add(new SqlParam("@tableName", KDDbType.String, tableName));
|
||||
//para.Add(new SqlParam("@FRECORDDATE", KDDbType.DateTime, System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")));
|
||||
|
||||
var para = new List<SqlParam>();
|
||||
para.Add(new SqlParam("@STARTDATE", KDDbType.Date, startDate));
|
||||
para.Add(new SqlParam("@ENDDATE", KDDbType.Date, endDate));
|
||||
@@ -53,6 +52,17 @@ namespace MonthlyProductionSchedule
|
||||
para.Add(new SqlParam("@MONTH", KDDbType.Int64, month));
|
||||
para.Add(new SqlParam("@DAY", KDDbType.Int64, 20));
|
||||
para.Add(new SqlParam("@LCID", KDDbType.Int64, this.Context.UserLocale.LCID));
|
||||
//var scheduleId = "65967bf69b80ca";//天大正式
|
||||
//scheduleId = "658e1974b04f4f"//天大测试
|
||||
//scheduleId = "657BF589F52174";//本地
|
||||
var sql = $@" EXEC PROC_SAVE_PLANPLMRPT_BEFORE_CHECK '{startDate}' ,'{endDate}' ,{year} ,{month} ";
|
||||
var dataSet = DBUtils.ExecuteDynamicObject(this.Context, $"/*dialect*/{sql}");
|
||||
|
||||
if (dataSet.IsEmpty())
|
||||
throw new Exception("检测结果未知,请联系管理员!");
|
||||
|
||||
if (dataSet[0]["code"].Long2Int() == -1)
|
||||
throw new Exception(dataSet[0]["msg"].ToString());
|
||||
|
||||
var res = DBUtils.ExecuteStoreProcedure(this.Context, "PROC_SAVE_PLANPLMRPT_DATA", para);
|
||||
|
||||
@@ -62,14 +72,7 @@ namespace MonthlyProductionSchedule
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (ex.Message.Contains("不能将值 NULL 插入列"))
|
||||
{
|
||||
this.View.ShowErrMessage("库存记录信息未记录!");
|
||||
}
|
||||
else
|
||||
{
|
||||
this.View.ShowErrMessage(ex.Message);
|
||||
}
|
||||
this.View.ShowErrMessage(ex.Message);
|
||||
}
|
||||
}
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user