| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | | using System.Drawing; |
| | | using System.Threading.Tasks; |
| | | using System.Windows.Forms; |
| | | using System.Windows.Media.Animation; |
| | | |
| | | |
| | | namespace Gs.DevApp.DevFrm |
| | | { |
| | |
| | | this.toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick; |
| | | toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick; |
| | | toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick; |
| | | toolBarMenu1.btnReportClick += ToolBarMenu1_btnReportClick; |
| | | toolBarMenu1.btnDesignClick += ToolBarMenu1_btnDesignClick; |
| | | //toolBarMenu1.btnReportClick += ToolBarMenu1_btnReportClick; |
| | | //toolBarMenu1.btnDesignClick += ToolBarMenu1_btnDesignClick; |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "qt015", "", (value) => |
| | | { |
| | | Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0); |
| | |
| | | MsgHelper.Warning("提示:" + ex.Message); |
| | | } |
| | | gcMx1.MouseClick += GcMx1_MouseClick; |
| | | this.ucBtnPrint1.btnDesignClick += (s, e) => |
| | | { |
| | | ucBtnPrint1.rptParameter = "rpt_Qtrk{}"; |
| | | }; |
| | | this.ucBtnPrint1.btnReportClick += (s, e) => |
| | | { |
| | | ucBtnPrint1.guidKey = ""; |
| | | string rowGuid = lbMxGuid.Text.Trim(); |
| | | ucBtnPrint1.guidKey = rowGuid; |
| | | if (string.IsNullOrEmpty(txt_iCount_1.Text.Trim())) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("请选择打印条码张数!"); |
| | | txt_iCount_1.Focus(); |
| | | this.ucBtnPrint1.rptParameter = "return false"; |
| | | return; |
| | | } |
| | | if (string.IsNullOrEmpty(txt_psnQty_1.Text.Trim())) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("请选择打印条码数量!"); |
| | | txt_psnQty_1.Focus(); |
| | | this.ucBtnPrint1.rptParameter = "return false"; |
| | | return; |
| | | } |
| | | if (lbMxGuid.Text.Trim().Length < 10) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("请选择打印的行!"); |
| | | this.ucBtnPrint1.rptParameter = "return false"; |
| | | return; |
| | | } |
| | | this.ucBtnPrint1.rptParameter = "rpt_Qtrk{" + lbMxGuid.Text.Trim() |
| | | + "," + "" |
| | | + "," + "" |
| | | + "," + txt_iCount_1.Text.Trim() |
| | | + "," + txt_psnQty_1.Text.Trim() |
| | | + "}"; |
| | | }; |
| | | } |
| | | private void GridView1_ColumnFilterChanged(object sender, EventArgs e) |
| | | |
| | | |
| | | |
| | | private void GridView1_ColumnFilterChanged(object sender, EventArgs e) |
| | | { |
| | | _filterList = Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns); |
| | | Task.Delay(100); |
| | | Task.Delay(100); |
| | | getPageList(1); |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 分页事件 |
| | | /// </summary> |
| | |
| | | } |
| | | private void ToolBarMenu1_btnDesignClick(object sender, EventArgs e) |
| | | { |
| | | toolBarMenu1.guidKey = ""; |
| | | string rowGuid, rowName; |
| | | (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, |
| | | lbGuid, txt_qtck, gridView1); |
| | | toolBarMenu1.guidKey = rowGuid; |
| | | toolBarMenu1.rptParameter = "rpt_Qtrk{}"; |
| | | |
| | | } |
| | | private void ToolBarMenu1_btnReportClick(object sender, EventArgs e) |
| | | { |
| | | //toolBarMenu1.guidKey = ""; |
| | | //string rowGuid, rowName; |
| | | //(rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, |
| | | // lbGuid, txt_itemName, gridView1); |
| | | //toolBarMenu1.guidKey = rowGuid; |
| | | //if (xtraTabControl1.SelectedTabPageIndex == 0) |
| | | //{ |
| | | // getModel(rowGuid, false, 999); |
| | | // this.toolBarMenu1.rptParameter = "return false"; |
| | | // return; |
| | | //} |
| | | //if (string.IsNullOrEmpty(txt_suppNo_1.GetCode())) |
| | | //{ |
| | | // Gs.DevApp.ToolBox.MsgHelper.ShowError("请选择供应商!"); |
| | | // txt_suppNo_1.Focus(); |
| | | // this.toolBarMenu1.rptParameter = "return false"; |
| | | // return; |
| | | //} |
| | | //if (string.IsNullOrEmpty(txt_iCount_1.Text.Trim())) |
| | | //{ |
| | | // Gs.DevApp.ToolBox.MsgHelper.ShowError("请选择打印条码张数!"); |
| | | // txt_iCount_1.Focus(); |
| | | // this.toolBarMenu1.rptParameter = "return false"; |
| | | // return; |
| | | //} |
| | | //if (string.IsNullOrEmpty(txt_psnQty_1.Text.Trim())) |
| | | //{ |
| | | // Gs.DevApp.ToolBox.MsgHelper.ShowError("请选择打印条码数量!"); |
| | | // txt_psnQty_1.Focus(); |
| | | // this.toolBarMenu1.rptParameter = "return false"; |
| | | // return; |
| | | //} |
| | | //this.toolBarMenu1.rptParameter = "rpt_ItemInv{" + txt_createDate1.Text.Trim() |
| | | // + "," + txt_tc_1.Checked.ToString().ToUpper() |
| | | // + "," + txt_suppNo_1.GetId() |
| | | // + "," + txt_iCount_1.Text.Trim() |
| | | // + "," + txt_psnQty_1.Text.Trim() |
| | | // + "}"; |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | if (row != null) |
| | | { |
| | | Guid? _guid = UtilityHelper.ToGuid(row["guid"].ToString()); |
| | | //string _msl = row["quantity"].ToString(); |
| | | //if (string.IsNullOrEmpty(_msl)) |
| | | //{ |
| | | // MsgHelper.ShowError("数量不能为空!"); |
| | | // return; |
| | | //} |
| | | string _msl = row["qd007"].ToString(); |
| | | if (string.IsNullOrEmpty(_msl)) |
| | | { |
| | | MsgHelper.ShowError("数量不能为空!"); |
| | | return; |
| | | } |
| | | _obj.list.Add(new |
| | | { |
| | | Guid = _guid, |
| | |
| | | /// </summary> |
| | | /// <param name="curPage">第几页</param> |
| | | /// <param name="pageSize">每页几条</param> |
| | | private void getPageList(int curPage) |
| | | private void getPageList(int curPage) |
| | | { |
| | | |
| | | |
| | | var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList); |
| | | PageQueryModel pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "qt001", "asc", "", _sbSqlWhere.ToString()); |
| | | string json = JsonConvert.SerializeObject(pgq); |
| | |
| | | { |
| | | ToolBox.MsgHelper.ShowError("提示:" + ex.Message); |
| | | } |
| | | |
| | | |
| | | } |
| | | private void getModel(string strGuid) |
| | | { |
| | |
| | | MsgHelper.Warning("请先选择你要操作的行!"); |
| | | return; |
| | | } |
| | | |
| | | var _obj = new |
| | | { |
| | | guid = strGuid,//主建 |
| | |
| | | |
| | | private void repositoryItemSearchLookUpEdit1_EditValueChanged(object sender, EventArgs e) |
| | | { |
| | | |
| | | SearchLookUpEdit LookupEdit = sender as SearchLookUpEdit; |
| | | DataRowView SelectedDataRow = (DataRowView)LookupEdit.GetSelectedDataRow(); |
| | | gvMx1.SetFocusedRowCellValue("qd002", SelectedDataRow["itemNo"]); |
| | | gvMx1.SetFocusedRowCellValue("qd003", SelectedDataRow["itemName"]); |
| | | gvMx1.SetFocusedRowCellValue("qd004", SelectedDataRow["itemModel"]); |
| | | gvMx1.SetFocusedRowCellValue("qd009", SelectedDataRow["dwName"]); |
| | | } |
| | | |
| | | private void repositoryItemButtonEdit1_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) |
| | |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnChkClick(object sender, EventArgs e) |
| | | private void ToolBarMenu1_btnChkClick(object sender, EventArgs e) |
| | | { |
| | | _toolCk(1); |
| | | } |
| | |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | /// <exception cref="NotImplementedException"></exception> |
| | | private void ToolBarMenu1_btnFChkClick(object sender, EventArgs e) |
| | | private void ToolBarMenu1_btnFChkClick(object sender, EventArgs e) |
| | | { |
| | | _toolCk(0); |
| | | } |
| | |
| | | /// 工具条事件 |
| | | /// </summary> |
| | | /// <param name="inFieldValue"></param> |
| | | private void _toolCk(int _inFieldValue) |
| | | private void _toolCk(int _inFieldValue) |
| | | { |
| | | string strMsg = ""; |
| | | switch (_inFieldValue) |
| | |
| | | } |
| | | if (!MsgHelper.AskQuestion("你选择了【" + rowName + "】,确定" + strMsg + "吗?")) |
| | | return; |
| | | |
| | | |
| | | var _obj = new |
| | | { |
| | | guid = rowGuid, |
| | |
| | | { |
| | | MsgHelper.Warning("提示:" + ex.Message); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | private void GcMx1_MouseClick(object sender, MouseEventArgs e) |
| | |
| | | if (string.IsNullOrEmpty(rowGuid)) |
| | | return; |
| | | lbMxGuid.Text = rowGuid; |
| | | toolBarMenu1.guidKey = rowGuid; |
| | | ucBtnPrint1.guidKey = rowGuid; |
| | | var info = gvMx1.CalcHitInfo(e.Location); |
| | | var view = info.View; |
| | | var row = view.GetDataRow(info.RowHandle); |