杨乐
2022-02-07 e0b802823c9b3e16387379e757df80ec9e5d6c55
宁波韩电入库单上传时间控制
1个文件已修改
19 ■■■■ 已修改文件
SCM/报表/KF_PonderationBillMain_ICMOReport.cs 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SCM/±¨±í/KF_PonderationBillMain_ICMOReport.cs
@@ -457,13 +457,26 @@
                }
                //先从本地文件ini获取上次生单时间  
                string cmbTime =Pub_Class.ClsIni.ReadIni("sdTime", "cmb5", Pub_Class.ClsPub.AppPath + @"\" + "ControlInfo.ini");
                //判断当前时间和上次生单时间,是否在30秒以上,如果没有到30秒则报错并返回,提示30秒后才能生单
                DateTime dxTime = DateTime.Now;//当前时间
                if (cmbTime != null || cmbTime != "")
                {
                    int scTime = int.Parse(DateTime.Parse(cmbTime).ToString("ss"));//上次时间
                    int schtime = int.Parse(dxTime.ToString("ss")) - scTime;//时差
                //如果上次生单时间为空,或者超过30秒,则允许生单
                    //如果上次生单时间为空,或者超过30秒,则允许生单
                    if (schtime < 30)
                    {
                        MessageBox.Show("生成失败!原因:还需要" + (30 - schtime) + "秒后才能生单");
                        return;
                    }
                }
                //将当前时间存入本地文件ini
                Pub_Class.ClsIni.WriteIni("sdTime", "cmb5", dxTime.ToString(), Pub_Class.ClsPub.AppPath + @"\" + "ControlInfo.ini");
                //生成产品入库单
                if (oWeb.set_SaveProductInBill_Caiji_CLD(oMain, ref sHBillNo, ref DBUtility.ClsPub.sExeReturnInfo))