private void btnSave_Click(object sender, RoutedEventArgs e) { ControlButton(false); DispatcherHelper.DoEvents(); string strPlaySwitch = "0"; if (rdbAdvertSwitch_Run.IsChecked == true) { strPlaySwitch = "1"; } string strMin = PubHelper.p_LangOper.GetStringBundle("Pub_Minute"); // 分钟 string strSecond = PubHelper.p_LangOper.GetStringBundle("Pub_Second"); // 秒 PubHelper.p_BusinOper.UpdateSysCfgValue("AdvertPlaySwitch", strPlaySwitch); ////PubHelper.p_BusinOper.UpdateSysCfgValue("AdvertImgShowTime", cmbImgShowTime.Text.Replace(strSecond, "")); PubHelper.p_BusinOper.UpdateSysCfgValue("AdvertPlayOutTime", cmbPlayOutTime.Text.Replace(strMin, "")); PubHelper.p_BusinOper.UpdateSysCfgValue("AdvertVolume", tbSoundNum.Text); PubHelper.ShowMsgInfo(PubHelper.p_LangOper.GetStringBundle("Pub_OperSuc"), PubHelper.MsgType.Ok); if (strPlaySwitch == "1") { ControlButton(true); } else { rdbAdvertSwitch_Run.IsEnabled = rdbAdvertSwitch_Stop.IsEnabled = true; btnSave.IsEnabled = btnCancel.IsEnabled = true; ControlSwitch(false); } }
/// <summary> /// 菜单—硬币库存管理 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void DeviceCfg_Menu_Coin_Click(object sender, RoutedEventArgs e) { if (PubHelper.p_BusinOper.PaymentOper.PaymentList.Cash.ControlSwitch == BusinessEnum.ControlSwitch.Stop) { // 如果现金支付没有启用 PubHelper.ShowMsgInfo(PubHelper.p_LangOper.GetStringBundle("Err_CashStop"), PubHelper.MsgType.Ok); return; } ////////if (PubHelper.p_BusinOper.ConfigInfo.CashManagerModel == BusinessEnum.CashManagerModel.Singal) ////////{ //////// // 货币高级管理模式没有开通 //////// PubHelper.ShowMsgInfo(PubHelper.p_LangOper.GetStringBundle("Err_NoCashManagerModel"), PubHelper.MsgType.Ok); //////// return; ////////} this.Opacity = PubHelper.OPACITY_GRAY; if (PubHelper.p_BusinOper.ConfigInfo.CoinDeviceType == BusinessEnum.CoinDeviceType.CoinDevice) { FrmDeviceCfg_CoinStock_Normal frmDeviceCfg_CoinStock = new FrmDeviceCfg_CoinStock_Normal(); frmDeviceCfg_CoinStock.ShowDialog(); } else { FrmDeviceCfg_CoinStock_Hopper frmDeviceCfg_CoinStock = new FrmDeviceCfg_CoinStock_Hopper(); frmDeviceCfg_CoinStock.ShowDialog(); } this.Opacity = PubHelper.OPACITY_NORMAL; }
/// <summary> /// 菜单—节能设置 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Menu_Energy_Click(object sender, RoutedEventArgs e) { if (!PubHelper.CheckIsManager1Purview("14")) { return; } StopMonOutTime(); bool blnIsControlCircle = false; for (int i = 0; i < PubHelper.p_BusinOper.AsileOper.VendBoxList.Count; i++) { if (PubHelper.p_BusinOper.AsileOper.VendBoxList[i].IsControlCircle == "1") { blnIsControlCircle = true; break; } } if (!blnIsControlCircle) { // 如果没有回路控制回路板,则不能使用节能设置 PubHelper.ShowMsgInfo(PubHelper.p_LangOper.GetStringBundle("Err_NoControlCircle"), PubHelper.MsgType.Ok); m_IsMonTime = true; return; } FrmEnergyCfg frmEnergyCfg = new FrmEnergyCfg(); frmEnergyCfg.ShowDialog(); m_IsMonTime = true; }
private void btnSave_Click(object sender, RoutedEventArgs e) { string strPort = cmbPort.Text.Replace("COM", ""); ////if (strPort == PubHelper.p_BusinOper.BarCodeOper.ComPort.ToString()) ////{ //// return; ////} string strScanModel = ConvertScanModel(); PubHelper.p_BusinOper.UpdateSysCfgValue("BarCodeScanPort", strPort); PubHelper.p_BusinOper.BarCodeOper.ComPort = Convert.ToInt32(strPort); PubHelper.p_BusinOper.UpdateSysCfgValue("BarCodeScanModel", strScanModel); PubHelper.p_BusinOper.BarCodeOper.ScanModel = strScanModel; PubHelper.ShowMsgInfo(PubHelper.p_LangOper.GetStringBundle("Pub_OperSuc"), PubHelper.MsgType.Ok); ////if (result) ////{ //// // 保存成功 ////} ////else ////{ //// PubHelper.ShowMsgInfo(PubHelper.p_LangOper.GetStringBundle("Pub_OperFail"), PubHelper.MsgType.Ok); ////} }
private void btnSaveDon_Click(object sender, RoutedEventArgs e) { ControlForm(false); string strDonPayType = string.Empty; if (cmbDonPayType.Text == m_Title_DonPayType_No) { strDonPayType = "0"; } if (cmbDonPayType.Text == m_Title_DonPayType_Cash) { strDonPayType = "1"; } if (cmbDonPayType.Text == m_Title_DonPayType_AliPay) { strDonPayType = "2"; } if (cmbDonPayType.Text == m_Title_DonPayType_CashAliPay) { strDonPayType = "3"; } PubHelper.p_BusinOper.SysCfgOper.UpdateSysCfg_Third("JuanZeng_Switch", strDonPayType); PubHelper.p_BusinOper.SysCfgOper.UpdateSysCfg_Third("DonUploadWebUrl", tbDonUploadWebUrl.Text); PubHelper.ShowMsgInfo(PubHelper.p_LangOper.GetStringBundle("Pub_OperSuc"), PubHelper.MsgType.Ok); ControlForm(true); }
private void btnSave_Click(object sender, RoutedEventArgs e) { string strPort = cmbPort.Text; if (strPort == "USB") { strPort = "0"; } else { strPort = strPort.Replace("COM", ""); } if (strPort == PubHelper.p_BusinOper.SysCfgOper.GetSysCfgValue("IDCardPort")) { return; } bool result = PubHelper.p_BusinOper.UpdateSysCfgValue("IDCardPort", strPort); if (result) { // 保存成功 PubHelper.ShowMsgInfo(PubHelper.p_LangOper.GetStringBundle("Pub_OperSuc"), PubHelper.MsgType.Ok); } else { PubHelper.ShowMsgInfo(PubHelper.p_LangOper.GetStringBundle("Pub_OperFail"), PubHelper.MsgType.Ok); } }
private void btnSave_Click(object sender, RoutedEventArgs e) { btnSave.IsEnabled = btnCancel.IsEnabled = false; DispatcherHelper.DoEvents(); string strKmbPort = cmbKmbPort.Text.Replace("COM", ""); string strSellFailTryNum = cmbSellFailTryNum.Text; string strColumnType = "0"; if (rdbColumnType_Num.IsChecked == true) { strColumnType = "1"; } string strIsShowPoint = "0"; if (rdbIsShowPoint_Yes.IsChecked == true) { strIsShowPoint = "1"; } PubHelper.p_BusinOper.UpdateSysCfgValue("KmbPort", strKmbPort); PubHelper.p_BusinOper.UpdateSysCfgValue("SellFailTryNum", strSellFailTryNum); PubHelper.p_BusinOper.UpdateSysCfgValue("ColumnType", strColumnType); PubHelper.p_BusinOper.UpdateSysCfgValue("IsShowPoint", strIsShowPoint); PubHelper.ShowMsgInfo(PubHelper.p_LangOper.GetStringBundle("Pub_OperSuc_Restart"), PubHelper.MsgType.Ok); this.Close(); }
private void btnSaveUrl_Click(object sender, RoutedEventArgs e) { ControlForm(false); PubHelper.p_BusinOper.SysCfgOper.UpdateSysCfg_Third("Url_ZyZXieHui_Index", tbUrl_ZyZXieHui_Index.Text); PubHelper.p_BusinOper.SysCfgOper.UpdateSysCfg_Third("Url_ZyZJiJinHui_Index", tbUrl_ZyZJiJinHui_Index.Text); PubHelper.p_BusinOper.SysCfgOper.UpdateSysCfg_Third("Url_ZyZXieHui_Item", tbUrl_ZyZXieHui_Item.Text); PubHelper.p_BusinOper.SysCfgOper.UpdateSysCfg_Third("Url_ZyZJiJinHui_Item", tbUrl_ZyZJiJinHui_Item.Text); string strClickXieHui = "0"; if (cmbClickXieHui.Text == m_Title_Run) { strClickXieHui = "1"; } PubHelper.p_BusinOper.SysCfgOper.UpdateSysCfg_Third("VisitWeb_Switch_ZyZXieHui", strClickXieHui); string strClickJiJinHui = "0"; if (cmbClickJiJinHui.Text == m_Title_Run) { strClickJiJinHui = "1"; } PubHelper.p_BusinOper.SysCfgOper.UpdateSysCfg_Third("VisitWeb_Switch_ZyZJiJinHui", strClickJiJinHui); PubHelper.ShowMsgInfo(PubHelper.p_LangOper.GetStringBundle("Pub_OperSuc"), PubHelper.MsgType.Ok); ControlForm(true); }
private void UploadCfgTrd() { m_IsTrd = false; string strErrCode = string.Empty; m_UploadResult = PubHelper.p_BusinOper.UploadSysCfg_Net("refresh", out strErrCode); m_IsTrd = true; string strOperInfo = string.Empty; if (m_UploadResult) { strOperInfo = PubHelper.p_LangOper.GetStringBundle("Pub_OperSuc_Restart"); } else { strOperInfo = PubHelper.p_LangOper.GetStringBundle("Pub_OperFail_Code").Replace("{N}", strErrCode); } this.tbInfo.Dispatcher.Invoke(new Action(() => { PubHelper.ShowMsgInfo(strOperInfo, PubHelper.MsgType.Ok); this.Close(); })); }
/// <summary> /// 按钮—清除纸币找零库存 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnClear_Click(object sender, RoutedEventArgs e) { string strAskInfo = PubHelper.p_LangOper.GetStringBundle("SysCfg_Menu_DeviceCfg_Bill_ClearAsk"); PubHelper.ShowMsgInfo(strAskInfo, PubHelper.MsgType.YesNo); if (PubHelper.p_MsgResult) { if (tbTipInfo.Visibility == System.Windows.Visibility.Visible) { tbTipInfo.Visibility = System.Windows.Visibility.Hidden; } ControlForm(false, false); bool result = PubHelper.p_BusinOper.CashInfoOper.ClearCashStockNum(PubHelper.p_BusinOper.ConfigInfo.ReturnBillMoney, "1"); if (result) { PubHelper.ShowMsgInfo(PubHelper.p_LangOper.GetStringBundle("Pub_OperSuc"), PubHelper.MsgType.Ok); ShowReturnBillNum(); } else { PubHelper.ShowMsgInfo(PubHelper.p_LangOper.GetStringBundle("Pub_OperFail"), PubHelper.MsgType.Ok); } ControlForm(true, true); } }
private void btnSave_Click(object sender, RoutedEventArgs e) { string strSerName = tbSerName_Value.Text; string strWebUrl = tbWebUrl_Value.Text; string strUserKey = tbUserKey_Value.Text; ControlForm(false); string strControlSwitch = "0"; if (rdbSwitch_Run.IsChecked == true) { strControlSwitch = "1"; } if (strSerName != PubHelper.p_BusinOper.SysCfgOper.GetSysCfgValue("WxTake_Name")) { PubHelper.p_IsRefreshSerBtnName = true; } bool result = PubHelper.p_BusinOper.UpdateSysCfgValue("WxTake_Switch", strControlSwitch); result = PubHelper.p_BusinOper.UpdateSysCfgValue("WxTake_Name", strSerName); result = PubHelper.p_BusinOper.UpdateSysCfgValue("WxTake_ServerUrl", strWebUrl); result = PubHelper.p_BusinOper.UpdateSysCfgValue("WxTake_UserKey", strUserKey); PubHelper.ShowMsgInfo(PubHelper.p_LangOper.GetStringBundle("Pub_OperSuc"), PubHelper.MsgType.Ok); ControlForm(true); if (strControlSwitch == "0") { ControlSwitch(false); } }
private void btnSave_Click(object sender, RoutedEventArgs e) { btnSave.IsEnabled = btnCancel.IsEnabled = false; DispatcherHelper.DoEvents(); string strSwitch = "0"; if (rdbSwitch_Run.IsChecked == true) { strSwitch = "1"; } string strCoinDeviceType = "0"; if (cmbCoinDeviceType.Text == m_CoinDevice_Hook) { strCoinDeviceType = "1"; } string strIsReturnBill = "0"; if (cmbIsReturnBill.Text == m_Run_Title) { strIsReturnBill = "1"; } // 保存参数 PubHelper.p_BusinOper.UpdateSysCfgValue("CashControlSwitch", strSwitch); PubHelper.p_BusinOper.UpdateSysCfgValue("CoinDeviceType", strCoinDeviceType); PubHelper.p_BusinOper.UpdateSysCfgValue("IsReturnBill", strIsReturnBill); PubHelper.ShowMsgInfo(PubHelper.p_LangOper.GetStringBundle("Pub_OperSuc_Restart"), PubHelper.MsgType.Ok); this.Close(); }
private void btnSave_Click(object sender, RoutedEventArgs e) { btnSave.IsEnabled = btnCancel.IsEnabled = false; DispatcherHelper.DoEvents(); string strSwitch = "0"; if (rdbSwitch_Run.IsChecked == true) { strSwitch = "1"; } string strSwitch_Pwd = "0"; if (rdbSwitch_Pwd_Run.IsChecked == true) { strSwitch_Pwd = "1"; } string strPort = cmbPort.Text.Replace("COM", ""); // 保存参数 PubHelper.p_BusinOper.UpdateSysCfgValue("OnlineEntityCardSwitch", strSwitch); if (strSwitch == "1") { PubHelper.p_BusinOper.UpdateSysCfgValue("OnlineEntityCardDevicePort", strPort); PubHelper.p_BusinOper.UpdateSysCfgValue("OnlineEntityCardIsPwd", strSwitch_Pwd); } PubHelper.ShowMsgInfo(PubHelper.p_LangOper.GetStringBundle("Pub_OperSuc"), PubHelper.MsgType.Ok); this.Close(); }
private void btnSave_Click(object sender, RoutedEventArgs e) { string strCodeName = tbCodeName_Value.Text; string strCodeLen = cmbCodeLen.Text; btnSave.IsEnabled = btnCancel.IsEnabled = false; bool result = false; switch (PubHelper.p_Now_Cfg_AddService) { case Business.Enum.BusinessEnum.AddServiceType.BarCode_Take: // 线下扫码取货 result = PubHelper.p_BusinOper.UpdateSysCfgValue("O2OTake_Name_CodeNum", strCodeName); result = PubHelper.p_BusinOper.UpdateSysCfgValue("O2OTake_CodeLen", strCodeLen); break; case Business.Enum.BusinessEnum.AddServiceType.WxTakeCode_Take: // 微信取货码取货 result = PubHelper.p_BusinOper.UpdateSysCfgValue("WxTake_Name_CodeNum", strCodeName); result = PubHelper.p_BusinOper.UpdateSysCfgValue("WxTake_CodeLen", strCodeLen); break; } PubHelper.ShowMsgInfo(PubHelper.p_LangOper.GetStringBundle("Pub_OperSuc"), PubHelper.MsgType.Ok); btnSave.IsEnabled = btnCancel.IsEnabled = true; }
/// <summary> /// 菜单—找零纸币管理 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void DeviceCfg_Menu_Cash_Click(object sender, RoutedEventArgs e) { if (PubHelper.p_BusinOper.PaymentOper.PaymentList.Cash.ControlSwitch == BusinessEnum.ControlSwitch.Stop) { // 如果现金支付没有启用 PubHelper.ShowMsgInfo(PubHelper.p_LangOper.GetStringBundle("Err_CashStop"), PubHelper.MsgType.Ok); return; } if (PubHelper.p_BusinOper.ConfigInfo.IsReturnBill == BusinessEnum.ControlSwitch.Stop) { PubHelper.ShowMsgInfo(PubHelper.p_LangOper.GetStringBundle("SysCfg_Menu_DeviceCfg_Bill_Err_No"), PubHelper.MsgType.Ok); return; } if (PubHelper.p_BusinOper.ConfigInfo.CashManagerModel == BusinessEnum.CashManagerModel.Singal) { // 货币高级管理模式没有开通 PubHelper.ShowMsgInfo(PubHelper.p_LangOper.GetStringBundle("Err_NoCashManagerModel"), PubHelper.MsgType.Ok); return; } this.Opacity = PubHelper.OPACITY_GRAY; FrmDeviceCfg_Bill FrmDeviceCfg_Bill = new FrmDeviceCfg_Bill(); FrmDeviceCfg_Bill.ShowDialog(); this.Opacity = PubHelper.OPACITY_NORMAL; }
/// <summary> /// 按钮—选择商品 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnSelectGoods_Click(object sender, RoutedEventArgs e) { if (!PubHelper.CheckIsManager1Purview("12")) { return; } PubHelper.p_BusinOper.GoodsOper.CurrentGoods = null; FrmGoodsChoice frmGoodsChoice = new FrmGoodsChoice(); frmGoodsChoice.ShowDialog(); if ((PubHelper.p_BusinOper.GoodsOper.CurrentGoods != null) && (currentGoodsWay.CurrentGoodsWayProduct != null)) { GoodsModel mcdInfo = new GoodsModel(); mcdInfo.McdCode = PubHelper.p_BusinOper.GoodsOper.CurrentGoods.McdCode; mcdInfo.McdName = PubHelper.p_BusinOper.GoodsOper.CurrentGoods.McdName; mcdInfo.McdContent = PubHelper.p_BusinOper.GoodsOper.CurrentGoods.McdContent; mcdInfo.PicName = PubHelper.p_BusinOper.GoodsOper.CurrentGoods.PicName; bool result = PubHelper.p_BusinOper.UpdateAsileGoods(currentGoodsWay.CurrentGoodsWayProduct.PaCode, mcdInfo); if (result) { PubHelper.p_IsRefreshAsile = true; if (PubHelper.p_BusinOper.ConfigInfo.GoodsShowModel == BusinessEnum.GoodsShowModelType.GoodsType) { PubHelper.p_IsRefreshGoodsType = true; } // 更改货道商品显示 tbMcdCode_Value.Text = mcdInfo.McdCode; tbMcdName_Value.Text = mcdInfo.McdName; tbMcdContent_Value.Text = mcdInfo.McdContent; currentGoodsWay.CurrentGoodsWayProduct.McdCode = tbMcdCode_Value.Text; currentGoodsWay.CurrentGoodsWayProduct.McdName = tbMcdName_Value.Text; currentGoodsWay.CurrentGoodsWayProduct.McdPicName = mcdInfo.PicName; currentGoodsWay.CurrentGoodsWayProduct.McdContent = mcdInfo.McdContent; SetAsileInfo(currentGoodsWay); currentGoodsWay.SetAsilePic(); if (!string.IsNullOrEmpty(mcdInfo.McdCode)) { if (PubHelper.p_BusinOper.ConfigInfo.GoodsShowModel != BusinessEnum.GoodsShowModelType.GoodsToOnlyAsile) { // 如果商品展示模式不是商品对应货道模式,则不能做移除商品处理 btnRemoveGoods.IsEnabled = false; } else { btnRemoveGoods.IsEnabled = true; } } } else { PubHelper.ShowMsgInfo(PubHelper.p_LangOper.GetStringBundle("Pub_OperFail"), PubHelper.MsgType.Ok); } } }
/// <summary> /// 清除商品信息 /// </summary> private void ClearGoodsTrd() { int intErrCode = 0; bool blnPrevious = false; bool blnNext = false; bool blnView = false; this.tbTitle.Dispatcher.Invoke(new Action(() => { // 记录操作前按钮的使能状态 blnPrevious = btnPrevious.IsEnabled; blnNext = btnDown.IsEnabled; blnView = btnView.IsEnabled; btnImport.IsEnabled = btnCancel.IsEnabled = btnPrevious.IsEnabled = btnDown.IsEnabled = btnView.IsEnabled = btnClearGoods.IsEnabled = btnDelete.IsEnabled = false; })); intErrCode = PubHelper.p_BusinOper.GoodsOper.ClearAllGoods(); string strMsgInfo = string.Empty; switch (intErrCode) { case 0: // 操作成功 strMsgInfo = PubHelper.p_LangOper.GetStringBundle("Pub_OperSuc"); // 清空所有货道的商品信息 PubHelper.p_BusinOper.AsileOper.ClearAllAsileGoods(); PubHelper.p_IsRefreshAsile = true; break; default: // 操作失败 strMsgInfo = PubHelper.p_LangOper.GetStringBundle("Pub_OperFail"); break; } this.tbTitle.Dispatcher.Invoke(new Action(() => { if (intErrCode == 0) { LoadPage(); } else { btnImport.IsEnabled = btnCancel.IsEnabled = true; btnPrevious.IsEnabled = blnPrevious; btnDown.IsEnabled = blnNext; btnView.IsEnabled = blnView; btnDelete.IsEnabled = false; if (m_GoodsCount > 0) { btnClearGoods.IsEnabled = true; } } PubHelper.ShowMsgInfo(strMsgInfo, PubHelper.MsgType.Ok); })); }
private void OperMainTrd() { this.tbTitle.Dispatcher.Invoke(new Action(() => { btnCancel.IsEnabled = false; ControlButton(false); })); int intErrCode = 0; string strNewStatus = string.Empty; switch (m_OperType) { case "0": // 开启纸币接收 strNewStatus = "1"; intErrCode = PubHelper.p_BusinOper.ControlBillType(m_CurrentItem.CurrentItem.CashValue, "1", m_CurrentItem.CurrentItem.Channel.ToString()); break; case "1": // 关闭纸币接收 strNewStatus = "0"; intErrCode = PubHelper.p_BusinOper.ControlBillType(m_CurrentItem.CurrentItem.CashValue, "0", m_CurrentItem.CurrentItem.Channel.ToString()); break; case "2": // 刷新纸币接收 intErrCode = PubHelper.p_BusinOper.QueryBillType(m_CurrentItem.CurrentItem.CashValue, m_CurrentItem.CurrentItem.Channel.ToString(), out strNewStatus); break; } this.tbTitle.Dispatcher.Invoke(new Action(() => { if (intErrCode == 0) { PubHelper.ShowMsgInfo(PubHelper.p_LangOper.GetStringBundle("Pub_OperSuc"), PubHelper.MsgType.Ok); // 刷新显示区域 m_CurrentItem.CurrentItem.Status = strNewStatus; string strStatusText = string.Empty; switch (strNewStatus) { case "0": // 关闭接收 strStatusText = m_Text_Stop; break; case "1": // 开启接收 strStatusText = m_Text_Run; break; } m_CurrentItem.SetSecondText(strStatusText); } else { PubHelper.ShowMsgInfo(PubHelper.p_LangOper.GetStringBundle("Pub_OperFail"), PubHelper.MsgType.Ok); } btnCancel.IsEnabled = true; ControlButton(true); })); }
/// <summary> /// 按钮—保存 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnSave_Click(object sender, RoutedEventArgs e) { ControlButton(false); DispatcherHelper.DoEvents(); #region 保存制冷模式 string strTmpRunModel = string.Empty; if (rdbTmpModel_Time.IsChecked == true) { strTmpRunModel = "0"; } if (rdbTmpModel_Run.IsChecked == true) { strTmpRunModel = "1"; } if (rdbTmpModel_Stop.IsChecked == true) { strTmpRunModel = "2"; } string strBeginTime1 = cmbTime1_Begin_Hour.Text + cmbTime1_Begin_Min.Text; string strEndTime1 = cmbTime1_End_Hour.Text + cmbTime1_End_Min.Text; string strBeginTime2 = cmbTime2_Begin_Hour.Text + cmbTime2_Begin_Min.Text; string strEndTime2 = cmbTime2_End_Hour.Text + cmbTime2_End_Min.Text; if (strTmpRunModel == "0") { // 检测时间段是否有效 bool result = false; string strErrInfo = string.Empty; result = PubHelper.CheckModelTime(strBeginTime1, strEndTime1, strBeginTime2, strEndTime2, out strErrInfo); if (!result) { PubHelper.ShowMsgInfo(strErrInfo, PubHelper.MsgType.Ok); ControlButton(true); return; } } #endregion PubHelper.p_BusinOper.AsileOper.UpdateVendBoxTmpCfg(m_VendBoxCode, m_TargetTmp, m_WarnTmp, strTmpRunModel, strBeginTime1, strEndTime1, strBeginTime2, strEndTime2); string strOutTmpModel = "0"; if (rdbOutTmp_Run.IsChecked == true) { strOutTmpModel = "1"; } PubHelper.p_BusinOper.UpdateSysCfgValue("OutTmpWarnModel", strOutTmpModel); PubHelper.ShowMsgInfo(PubHelper.p_LangOper.GetStringBundle("Pub_OperSuc"), PubHelper.MsgType.Ok); ControlButton(true); }
private void btnBuBi_End_Click(object sender, RoutedEventArgs e) { string strAskInfo = PubHelper.p_LangOper.GetStringBundle("Pub_Oper_Ask_Stop"); PubHelper.ShowMsgInfo(strAskInfo, PubHelper.MsgType.YesNo); if (PubHelper.p_MsgResult) { m_StopRefill = true; } }
/// <summary> /// 是否正在测试 /// </summary> /// <returns>结果 True:正在测试 False:没有测试</returns> private bool CheckIsTesting() { if (m_IsTrdOper) { // 正在测试 PubHelper.ShowMsgInfo(PubHelper.p_LangOper.GetStringBundle("SysCfg_Menu_AsileTest_Err_Test"), PubHelper.MsgType.Ok); return(true); } return(false); }
private void btnSave_Click(object sender, RoutedEventArgs e) { btnSave.IsEnabled = btnCancel.IsEnabled = false; DispatcherHelper.DoEvents(); string strControlSwitch = "0"; if (rdbControlSwitch_Run.IsChecked == true) { strControlSwitch = "1"; } string strIcQuerySwitch = "0"; if (rdbIcQuerySwitch_Run.IsChecked == true) { strIcQuerySwitch = "1"; } string strPayShow = "0"; if (rdbPayShow_Run.IsChecked == true) { strPayShow = "1"; } string strHideCardNum = "0"; if (rdbHideCardNum_Run.IsChecked == true) { strHideCardNum = "1"; } string strIcPort = cmbIcPort.Text.Replace("COM", ""); string strShowCardInfoTime = cmbShowCardInfoTime.Text.Replace(PubHelper.p_LangOper.GetStringBundle("Pub_Second"), ""); ////string strIcBusiModel_Text = cmbIcBusiModel.Text; ////string strIcBusiModel_Value = "1"; ////if (strIcBusiModel_Text == PubHelper.p_LangOper.GetStringBundle("SysCfg_Menu_AdvanCfg_Card_IcBusiModel_QueryPay")) ////{ //// strIcBusiModel_Value = "0"; ////} // 保存参数 PubHelper.p_BusinOper.UpdateSysCfgValue("IcControlSwitch", strControlSwitch); PubHelper.p_BusinOper.UpdateSysCfgValue("IcQuerySwitch", strIcQuerySwitch); PubHelper.p_BusinOper.UpdateSysCfgValue("ShowCardInfoTime", strShowCardInfoTime); PubHelper.p_BusinOper.UpdateSysCfgValue("IcPort", strIcPort); PubHelper.p_BusinOper.UpdateSysCfgValue("IcPayShowSwitch", strPayShow); ////PubHelper.p_BusinOper.UpdateSysCfgValue("IcBusiModel", strIcBusiModel_Value); PubHelper.p_BusinOper.UpdateSysCfgValue("IcCardNumHide", strHideCardNum); PubHelper.ShowMsgInfo(PubHelper.p_LangOper.GetStringBundle("Pub_OperSuc"), PubHelper.MsgType.Ok); this.Close(); }
private void btnSave_Click(object sender, RoutedEventArgs e) { string strVmId = tbVmId_Value.Text; string strLgsId = tbLgsId_Value.Text; string strSoftType = "0"; if (rdbIsTestVer_Demo.IsChecked == true) { strSoftType = "1"; } // 检测数据有效性 if (!(PubHelper.p_BusinOper.CheckDataOper.CheckIsPosInt(strVmId)) || (strVmId.Length != 10)) { // 机器出厂号无效 PubHelper.ShowMsgInfo(PubHelper.p_LangOper.GetStringBundle("Err_Input_InvalidVmId"), PubHelper.MsgType.Ok); return; } bool blnLgsIdIsNormal = true; if (strLgsId.Length != 3) { blnLgsIdIsNormal = false; } else { if ((strLgsId != "000") && (!(PubHelper.p_BusinOper.CheckDataOper.CheckIsPosInt(strLgsId)))) { blnLgsIdIsNormal = false; } } if (!blnLgsIdIsNormal) { // 客户编码无效 PubHelper.ShowMsgInfo(PubHelper.p_LangOper.GetStringBundle("Err_Input_InvalidLgsId"), PubHelper.MsgType.Ok); return; } btnSave.IsEnabled = btnCancel.IsEnabled = false; DispatcherHelper.DoEvents(); // 保存数据 PubHelper.p_BusinOper.UpdateSysCfgValue("VmId", strVmId); PubHelper.p_BusinOper.UpdateSysCfgValue("LgsId", strLgsId); PubHelper.p_BusinOper.UpdateSysCfgValue("IsTestVer", strSoftType); PubHelper.ShowMsgInfo(PubHelper.p_LangOper.GetStringBundle("Pub_OperSuc_Restart"), PubHelper.MsgType.Ok); this.Close(); }
/// <summary> /// 现金中提交捐赠信息 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnOK_Click(object sender, RoutedEventArgs e) { if (!CheckMobilePhone()) { PubHelper.ShowMsgInfo("请输入有效的手机号码", PubHelper.MsgType.Ok); return; } StopMonOutTime(); m_NowStep = "2"; }
/// <summary> /// 按钮—确定 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnOk_Click(object sender, RoutedEventArgs e) { AfreshMonOutTime(); m_IsMonTime = true; if (string.IsNullOrEmpty(m_Input)) { return; } string strTipInfo = string.Empty; bool blnIsOk = true; // 查询货道编码是否存在 int paIndex = 0; int intErrCode = PubHelper.p_BusinOper.AsileOper.GetPaIndex(m_Input, out paIndex); if (intErrCode != 0) { strTipInfo = m_TipInfo_NoAsile; // 没有该货道 blnIsOk = false; } else { // 检测商品是否能被点击 bool result = PubHelper.p_BusinOper.CheckIsClickGoods(PubHelper.p_BusinOper.AsileOper.AsileList[paIndex].VendBoxCode, PubHelper.p_BusinOper.AsileOper.AsileList[paIndex].PaCode, Convert.ToInt32(PubHelper.p_BusinOper.AsileOper.AsileList[paIndex].SellPrice), false); if (!result) { // 库存不足,不能点击 strTipInfo = m_TipInfo_NoStock; blnIsOk = false; } } if (!blnIsOk) { PubHelper.p_CheckKeyAsileCodeResult = false; StopMonOutTime(); PubHelper.ShowMsgInfo(strTipInfo, PubHelper.MsgType.Ok); PubHelper.p_Keyboard_Input_AsileCode = string.Empty; m_Input = tbInput.Text = string.Empty; AfreshMonOutTime(); m_IsMonTime = true; return; } PubHelper.p_CheckKeyAsileCodeResult = true; PubHelper.p_Keyboard_Input_AsileCode = m_Input; this.Close(); }
private void btnClearGoods_Click(object sender, RoutedEventArgs e) { string strAskInfo = PubHelper.p_LangOper.GetStringBundle("SysCfg_Menu_GoodsManager_ClearAsk"); PubHelper.ShowMsgInfo(strAskInfo, PubHelper.MsgType.YesNo); if (PubHelper.p_MsgResult) { Thread TrdClearGoods = new Thread(new ThreadStart(ClearGoodsTrd)); TrdClearGoods.IsBackground = true; TrdClearGoods.Start(); } }
private void btnDelete_Click(object sender, RoutedEventArgs e) { if (m_CurrentGoods.CurrentGoods != null) { string strAskInfo = PubHelper.p_LangOper.GetStringBundle("SysCfg_Menu_GoodsManager_DeleteAsk"); PubHelper.ShowMsgInfo(strAskInfo, PubHelper.MsgType.YesNo); if (PubHelper.p_MsgResult) { bool blnPrevious = false; bool blnNext = false; blnPrevious = btnPrevious.IsEnabled; blnNext = btnDown.IsEnabled; btnImport.IsEnabled = btnClearGoods.IsEnabled = btnCancel.IsEnabled = btnView.IsEnabled = btnDelete.IsEnabled = btnPrevious.IsEnabled = btnDown.IsEnabled = false; string strMsgInfo = string.Empty; int intErrCode = PubHelper.p_BusinOper.GoodsOper.DeleteGoods(m_CurrentGoods.CurrentGoods.McdCode); switch (intErrCode) { case 0: // 删除成功 LoadPage(); PubHelper.ShowMsgInfo(PubHelper.p_LangOper.GetStringBundle("Pub_OperSuc"), PubHelper.MsgType.Ok); break; case 1: // 有货道上架了该商品 PubHelper.ShowMsgInfo(PubHelper.p_LangOper.GetStringBundle("SysCfg_Menu_GoodsManager_Delete_Put"), PubHelper.MsgType.Ok); break; default: // 失败 PubHelper.ShowMsgInfo(PubHelper.p_LangOper.GetStringBundle("Pub_OperFail"), PubHelper.MsgType.Ok); break; } if (intErrCode != 0) { btnImport.IsEnabled = btnCancel.IsEnabled = true; btnPrevious.IsEnabled = blnPrevious; btnDown.IsEnabled = blnNext; btnDelete.IsEnabled = btnView.IsEnabled = true; btnClearGoods.IsEnabled = true; } } } else { PubHelper.ShowMsgInfo(PubHelper.p_LangOper.GetStringBundle("SysCfg_Menu_GoodsManager_Delete_NoSelect"), PubHelper.MsgType.Ok); } }
/// <summary> /// 托盘补满 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnTrayFull_Click(object sender, RoutedEventArgs e) { string strAskInfo = PubHelper.p_LangOper.GetStringBundle("SysCfg_Menu_Stock_TrayFillAsk"); strAskInfo = strAskInfo.Replace("{N}", PubHelper.p_BusinOper.ChangeTray((currentTrayIndex + 1).ToString())); PubHelper.ShowMsgInfo(strAskInfo, PubHelper.MsgType.YesNo); if (PubHelper.p_MsgResult) { SetTrayStockNum("0"); } }
/// <summary> /// 菜单—升降设备设置 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void AdvanCfg_Menu_UpDownCfg_Click(object sender, RoutedEventArgs e) { if (PubHelper.p_BusinOper.AsileOper.VendBoxList_Lifter.Count == 0) { // 如果出货方式都为弹簧,则不能操作该菜单 PubHelper.ShowMsgInfo(PubHelper.p_LangOper.GetStringBundle("SysCfg_Menu_AdvanCfg_UpDown_NoLimit"), PubHelper.MsgType.Ok); return; } FrmAdvanCfg_UpDownCfg frmAdvanCfg_UpDownCfg = new FrmAdvanCfg_UpDownCfg(); frmAdvanCfg_UpDownCfg.ShowDialog(); }
private void OperBillStatus() { string strAskInfo = PubHelper.p_LangOper.GetStringBundle("Pub_Oper_Ask"); PubHelper.ShowMsgInfo(strAskInfo, PubHelper.MsgType.YesNo); if (PubHelper.p_MsgResult) { // 更改接收状态 Thread TrdOperMain = new Thread(new ThreadStart(OperMainTrd)); TrdOperMain.IsBackground = true; TrdOperMain.Start(); } }