Beispiel #1
0
 private bool CheckItemExists(string strITEM)
 {
     CGDModel.VDS_CGD39_BCO BCO = new CGDModel.VDS_CGD39_BCO(ConntionDB);
     ParameterList.Clear();
     ParameterList.Add(DBPara(strITEM, ParaType.Varchar2));
     DataTable dt = BCO.QueryItem(ParameterList);
     if (dt.Rows.Count > 0)
         return true;
     else
         return false;
 }
Beispiel #2
0
    private static string GetItemName(string strItem)
    {
        string strResult = string.Empty;
        CGDModel.VDS_CGD39_BCO BCO = new CGDModel.VDS_CGD39_BCO(ConntionDB);
        ParameterList.Clear();
        ParameterList.Add(strItem);
        DataTable dt = BCO.QueryItem(ParameterList);

        if (dt.Rows.Count > 0)
        {
            string strNowDate = DateTime.Now.ToString("yyyy/MM/dd");
            if (string.Compare(dt.Rows[0]["mdc_end_date"].ToString(), strNowDate) < 0)
            {
                strResult = "此品號已過期";
            }
            else
            {
                strResult = dt.Rows[0]["ITEM_NAME"].ToString().Trim();
            }
        }
        else
        {
            strResult = "無此品號資料";
        }
        return strResult;
    }