| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | | using System.IO; |
| | | using System.Threading.Tasks; |
| | | using System.Windows.Forms; |
| | | namespace Gs.DevApp.DevFrm |
| | |
| | | { |
| | | Gs.DevApp.ToolBox.UtilityHelper.PrintAuto(txt_psnQty_1, txt_iCount_1, radOut, txt_yuliang_1); |
| | | }; |
| | | |
| | | #region 2025-08-27 复制beg |
| | | btnCopyXls.Click += (s, e) => |
| | | { |
| | | string kcZz = txt_qt022.GetId(); |
| | | if (string.IsNullOrEmpty(kcZz)) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("请先选择库存组织后才能使用复制功能!"); |
| | | txt_qt022.Focus(); |
| | | return; |
| | | } |
| | | string filePath = AppContext.BaseDirectory + "xlsCopy.xls"; |
| | | if (File.Exists(filePath)) |
| | | { |
| | | var frm = new CopyXls(kcZz, lbGuid.Text.Trim(), OrderType.其它入库.ToString()); |
| | | frm.UpdateParent += (ss, ee) => |
| | | { |
| | | try |
| | | { |
| | | var lst = ee.DynamicList; |
| | | DataTable _Table = (DataTable)gcMx1.DataSource; |
| | | foreach (dynamic dym in lst) |
| | | { |
| | | DataRow _row = _Table.NewRow(); |
| | | _row["qd002"] = dym.itemNo; |
| | | _row["qd003"] = dym.itemName; |
| | | _row["qd004"] = dym.itemModel; |
| | | _row["kcDw"] = dym.dwName; |
| | | _row["itemId"] = dym.itemId; |
| | | _row["qd007"] = dym.sl; |
| | | _row["qd010"] = dym.bz; |
| | | _row["qd012"] = dym.bllx; |
| | | _Table.Rows.Add(_row); |
| | | } |
| | | gcMx1.BindingContext = new BindingContext(); |
| | | gcMx1.DataSource = _Table; |
| | | gcMx1.ForceInitialize(); |
| | | gvMx1.CloseEditor(); |
| | | gvMx1.PostEditor(); |
| | | gvMx1.UpdateCurrentRow(); |
| | | gvMx1.BestFitColumns(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError(ex.Message); |
| | | } |
| | | }; |
| | | frm.ShowDialog(); |
| | | } |
| | | else |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("找不到xlsCopy.xls文件,请联系管理员!"); |
| | | } |
| | | }; |
| | | #endregion |
| | | } |
| | | |
| | | private void GridView1_ColumnFilterChanged(object sender, EventArgs e) |
| | |
| | | string inHz = ucLookHuoZhu1.GetHzId();//货主 |
| | | string inRkyy = txt_qt010.Text.Trim();//入库原因 |
| | | string kcCk = txt_qt008.GetId();//仓库 |
| | | string qtlx = txt_qtlx.Text.Trim();//后来增加的类型 |
| | | if (string.IsNullOrEmpty(kcZz)) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("请选择库存组织!"); |
| | |
| | | txt_qt003.Focus(); |
| | | return; |
| | | } |
| | | if (txt_qt019.SelectedIndex <= 0) |
| | | if (txt_qtlx.SelectedIndex <= 0) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("请选择库存方向!"); |
| | | txt_qt019.Focus(); |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("请选择入库类型!"); |
| | | txt_qtlx.Focus(); |
| | | return; |
| | | } |
| | | if (string.IsNullOrEmpty(kcBm) && string.IsNullOrEmpty(kcGys)) |
| | |
| | | txt_qt009.Focus(); |
| | | return; |
| | | } |
| | | //if (string.IsNullOrEmpty(kcCk)) |
| | | //{ |
| | | // Gs.DevApp.ToolBox.MsgHelper.Warning("请选择收料仓库!"); |
| | | // txt_qt008.Focus(); |
| | | // return; |
| | | //} |
| | | if (string.IsNullOrEmpty(kcCk)) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("请选择收料仓库!\n如果不是【报废仓】!\nQC可以重新设置仓库!"); |
| | | txt_qt008.Focus(); |
| | | return; |
| | | } |
| | | var _obj = new |
| | | { |
| | | guid = UtilityHelper.ToGuid(lbGuid.Text.Trim()), //主建 |
| | |
| | | hzlx = inHzlx,//货主类型 |
| | | inHz = inHz,//货主 |
| | | inSource = txt_qt035.EditValue,//工单号 |
| | | qtlx = qtlx, |
| | | list = new List<dynamic>(), |
| | | }; |
| | | gvMx1.CloseEditor(); |
| | |
| | | /// <param name="strGuid"></param> |
| | | private void getModel(string strGuid) |
| | | { |
| | | |
| | | gcMx1.DataSource = null; |
| | | bool isEdit = false; |
| | | if (toolBarMenu1.currentAction == "add") return; |
| | |
| | | getModel(lbGuid.Text); |
| | | } |
| | | else |
| | | MsgHelper.ShowError("提示:" + _rtn.rtnMsg); |
| | | MsgHelper.ShowError("提示:" + _rtn.rtnMsg); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | _webServiceName + "EditModelSubmit", |
| | | JsonConvert.SerializeObject(_obj)); |
| | | var _rtn = UtilityHelper.ReturnToDynamic(strJson); |
| | | |
| | | |
| | | if (_rtn.rtnCode > 0 && _rtn.rtnData.outSum * 1 > 0) |
| | | { |
| | | MsgHelper.ShowInformation(_rtn.rtnData.outMsg.ToString()); |