| | |
| | | HParentID = sr[0].ToString(); |
| | | } |
| | | //杩囨护鏉′欢 |
| | | if (frmCondition.SqlStr.Trim().Length == 0) |
| | | if (HParentID == "" || HParentID == "鐗╂枡璧勬枡" || HParentID == "宸ュ簭璧勬枡") |
| | | { |
| | | if (HParentID == "" || HParentID == "鐗╂枡璧勬枡" || HParentID == "宸ュ簭璧勬枡") |
| | | { |
| | | sSql = "Select top 10000 * from " + ViewName + " order by HItemID Desc"; |
| | | } |
| | | else |
| | | { |
| | | if (wl.Checked == false) |
| | | { |
| | | sSql = "Select top 10000 * from " + ViewName + " where 宸ュ簭浠g爜 like '%" + HParentID.ToString() + "%' order by HItemID Desc" ; |
| | | } |
| | | else |
| | | { |
| | | sSql = "Select top 10000 * from " + ViewName + " where 鐗╂枡浠g爜 like '%" + HParentID.ToString() + "%' order by HItemID Desc "; |
| | | } |
| | | |
| | | } |
| | | sSql = "Select top 10000 * from " + ViewName + " order by HItemID Desc"; |
| | | } |
| | | else |
| | | { |
| | | sSql = frmCondition.SqlStr + sWhere + " order by HItemID Desc"; |
| | | if (wl.Checked == false) |
| | | { |
| | | sSql = "Select top 10000 * from " + ViewName + " where 宸ュ簭浠g爜 like '%" + HParentID.ToString() + "%' order by HItemID Desc"; |
| | | } |
| | | else |
| | | { |
| | | sSql = "Select top 10000 * from " + ViewName + " where 鐗╂枡浠g爜 like '%" + HParentID.ToString() + "%' order by HItemID Desc "; |
| | | } |
| | | |
| | | } |
| | | //鎵цSQL |
| | | DSet = SubCn.RunProcReturn(sSql, ViewName); |
| | |
| | | oSumGrid.BuildTotalCols(sT); |
| | | // |
| | | //鍐荤粨 |
| | | int FrCol = DBUtility.ClsPub.isInt(frmCondition.txtFrozenCol.Text); |
| | | string s = frmCondition.cmbHComplete.Text; |
| | | DBUtility.Xt_BaseBillFun.DisplayGrid(grdMain, this.Name, s, FrCol); |
| | | //int FrCol = DBUtility.ClsPub.isInt(frmCondition.txtFrozenCol.Text); |
| | | //string s = frmCondition.cmbHComplete.Text; |
| | | //DBUtility.Xt_BaseBillFun.DisplayGrid(grdMain, this.Name, s, FrCol); |
| | | //鐢荤嚎 |
| | | // |
| | | Total(); |
| | | //Total(); |
| | | } |
| | | |
| | | //鍚堣 new |