| | |
| | | { |
| | | string strType = ""; |
| | | string orgId = ""; |
| | | string pGuid = ""; |
| | | private List<FilterEntity> _filterList = new List<FilterEntity>(); |
| | | private readonly string _webServiceName = "MesQmCheckitemManager/"; |
| | | public Frm_CqfaItems(string _strType, string _orgId) |
| | | public Frm_CqfaItems() |
| | | { |
| | | InitializeComponent(); |
| | | strType = _strType; |
| | | orgId = _orgId; |
| | | pageBar1.setBar(false); |
| | | this.gvMain.CustomDrawColumnHeader += (s, e) => { Gs.DevApp.ToolBox.UtilityHelper.CustomDrawColumnHeader(s, e); }; |
| | | this.gvMain.MouseUp += (s, e) => { Gs.DevApp.ToolBox.UtilityHelper.CustomMouseUp(s, e, gcMain, gvMain); }; |
| | |
| | | pageBar1.PagerEvent += PageBar1_PagerEvent; |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gvMain); |
| | | } |
| | | public void Initialize() |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <param name="_pGuid"></param> |
| | | /// <param name="_strType"></param> |
| | | /// <param name="_orgId"></param> |
| | | public void Initialize(string _pGuid, string _strType, string _orgId) |
| | | { |
| | | strType = _strType; |
| | | orgId = _orgId; |
| | | pGuid = _pGuid; |
| | | getPageList(1); |
| | | } |
| | | |
| | | public void Clean() |
| | | { |
| | | gcMain.DataSource = null; |
| | | } |
| | | #region 源物料数据绑定 |
| | | |
| | | private void GridView1_ColumnFilterChanged(object sender, EventArgs e) |
| | |
| | | { |
| | | gcMain.DataSource = null; |
| | | var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList); |
| | | _sbSqlWhere += " and org.fid=" + orgId + ""; |
| | | var pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "item_no", "asc", "", _sbSqlWhere.ToString(), strType); |
| | | _sbSqlWhere += " and org.fid=" + orgId + ""; |
| | | //这个pguid,作为方案的主键 |
| | | var pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "item_no", "asc", pGuid, _sbSqlWhere.ToString(), strType); |
| | | var json = JsonConvert.SerializeObject(pgq); |
| | | try |
| | | { |
| | |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | public string GetSelect() |
| | | { |
| | | System.Text.StringBuilder sb = new System.Text.StringBuilder(); |
| | | gvMain.PostEditor(); |
| | | gvMain.UpdateCurrentRow(); |
| | | DataTable dt = this.gcMain.DataSource as DataTable; |
| | | { |
| | | foreach (DataRow dr in dt.Rows) |
| | | { |
| | | string checkBox = dr["chkInt"].ToString(); |
| | | string _guid = dr["guid"].ToString(); |
| | | if (Gs.DevApp.ToolBox.UtilityHelper.ToCheck(checkBox)) |
| | | { |
| | | if (sb.Length > 0) |
| | | sb.Append(","); |
| | | sb.Append(_guid); |
| | | } |
| | | } |
| | | } |
| | | return sb.ToString(); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | } |