public DataTable QuerySwitch(QueryType QT, ArrayList ParameterList) { #region VDS_ALO_STOREASSIGN_TMP_DBO ALOM = new VDS_ALO_STOREASSIGN_TMP_DBO(ref USEDB); DataTable Dt; try { switch (QT) { case QueryType.CheckCurrentItemStatus: Dt = ALOM.doCheckCurrentItemStatus(ParameterList); break; case QueryType.GetStoreAssign_TmpSchema: Dt = ALOM.GetStoreAssign_TmpSchema(ParameterList); break; default: Dt = new DataTable(); break; } return Dt; } catch (Exception ex) { throw GetNewException(ex); } #endregion }
public DataTable QueryStorSpecByFind(Hashtable htParams) { #region try { VDS_ALO_STORESPEC_MAIN_DBO ALOM = new VDS_ALO_STORESPEC_MAIN_DBO(ref USEDB); VDS_ALO_STOREASSIGN_TMP_DBO ALO1 = new VDS_ALO_STOREASSIGN_TMP_DBO(ref USEDB); DataTable dt = ALOM.doQueryByFind(htParams); DataTable dtTemp; ArrayList ParameterList = new ArrayList(); Hashtable ht = new Hashtable(); bool bResult; string strStstusCode="",strStstus = "", strStstusDesc = ""; if (dt != null) { for (Int32 i = 0; i <= dt.Rows.Count - 1; i++) { strStstusCode = ""; strStstus = ""; strStstusDesc = ""; ParameterList.Clear(); ParameterList.Add(dt.Rows[i]["item"]); dtTemp = ALO1.doCheckCurrentItemStatus(ParameterList); if (dtTemp != null) { if (dtTemp.Rows[0][0].ToString() == "0") { strStstusDesc = dtTemp.Rows[0][1].ToString(); } } ht.Clear(); ht.Add("Item", dt.Rows[i]["item"]); ht.Add("StartDate", dt.Rows[i]["s_start_date"].ToString() == "" ? null : ((DateTime)dt.Rows[i]["s_start_date"]).ToString("yyyy/MM/dd")); ht.Add("EndDate", dt.Rows[i]["s_end_date"].ToString() == "" ? null : ((DateTime)dt.Rows[i]["s_end_date"]).ToString("yyyy/MM/dd")); string strErrMsg = ""; bResult = CheckOverDu(ht, ref strErrMsg); if (!bResult) { strStstusDesc += strErrMsg; } if (strStstusDesc.Trim() != "") { strStstus = "未生效"; strStstusCode = "0"; } else { strStstus = "生效"; strStstusCode = "1"; } if (strStstusDesc.Trim().Length > 0) { if (strStstusDesc.Substring(strStstusDesc.Length - 1, 1) == ",") { strStstusDesc = strStstusDesc.Substring(0, strStstusDesc.Length - 1); } } dt.Rows[i]["itemstatusCode"] = strStstusCode; dt.Rows[i]["itemstatus"] = strStstus; dt.Rows[i]["itemstatusdesc"] = strStstusDesc; } } return dt; } catch (Exception ex) { throw GetNewException(ex); } #endregion }
public DataTable CheckCurrentItemStatus(ArrayList ParameterList) { #region try { VDS_ALO_STOREASSIGN_TMP_DBO ALOM = new VDS_ALO_STOREASSIGN_TMP_DBO(ref USEDB); return ALOM.doCheckCurrentItemStatus(ParameterList); } catch (Exception ex) { throw GetNewException(ex); } #endregion }