public string GetDoName(string Code,
                            string Z_O
                            )
    {
        string Name = "";
        string ConnectionDBStr = ((DatabaseSettings)ConfigurationManager.GetSection("dataConfiguration")).DefaultDatabase;
        MaintainDoBase co_main = new MaintainDoBase(ConnectionDBStr);        

        if (Code != "")
        {
            ArrayList ParameterList = new ArrayList();
            ParameterList.Clear();
            ParameterList.Add(Code);
            ParameterList.Add(Z_O);              
            
            DataTable Dt = co_main.QueryForSLP(ParameterList);

            if (Dt.Rows.Count > 0)
            {
                Name = Dt.Rows[0]["CODE_NAME"].ToString().Trim();
            }
            else
            {
                Name = "查無資料";
            }
        }

        return Name;
    }
Esempio n. 2
0
    private string GetDoName()
    {
        STMModel.MaintainDoBase bco = new STMModel.MaintainDoBase(ConnectionDB);
        DataTable dt = null;

        ArrayList parameterList = new ArrayList();
        parameterList.Add(SLP_D_O.Text);
        parameterList.Add(SLP_Z_O.Text);
        dt = bco.QueryForSLP(parameterList);

        if (dt.Rows.Count > 0)
        {
            return dt.Rows[0]["CODE_NAME"].ToString();
        }
        else
        {
            return "";
        }
    }