| | |
| | | { |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | ds = oCN.RunProcReturn("select * from h_v_Sc_EquipMaintainPlan " + sWhere + " order by hmainid desc", "h_v_Sc_EquipMaintainPlan"); |
| | | ds = oCN.RunProcReturn("select * from h_v_Sc_EquipMaintain " + sWhere + " order by hmainid desc", "h_v_Sc_EquipMaintain"); |
| | | } |
| | | else |
| | | { |
| | | string sql1 = "select * from h_v_Sc_EquipMaintainPlan where 1 = 1"; |
| | | string sql1 = "select * from h_v_Sc_EquipMaintain where 1 = 1"; |
| | | string sql = sql1 + sWhere + " order by hmainid desc"; |
| | | ds = oCN.RunProcReturn(sql, "h_v_Sc_EquipMaintainPlan"); |
| | | ds = oCN.RunProcReturn(sql, "h_v_Sc_EquipMaintain"); |
| | | } |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |