Esempio n. 1
0
        private string boolStr(string loginName)
        {
            StringBuilder str = new StringBuilder();
            DataSet       ds  = bll.GetList("tzparId=0");
            string        ids = "";

            if ((ds != null) && ds.Tables[0].Rows.Count > 0)
            {
                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)//大类
                {
                    bool flag = false;
                    dr  = ds.Tables[0].Rows[i];
                    ids = dr["tztypeId"].ToString() + ",";
                    string[] strId  = ids.Split(',');
                    string   strIDs = "";
                    for (int b = 0; b < strId.Length - 1; b++)
                    {
                        DataSet ds1 = bll.GetList(" tzparId =" + int.Parse(strId[b]));

                        if ((ds1 != null) && ds1.Tables[0].Rows.Count > 0)
                        {
                            for (int j = 0; j < ds1.Tables[0].Rows.Count; j++)
                            {
                                dr      = ds1.Tables[0].Rows[j];
                                strIDs += dr["tztypeId"].ToString() + ",";
                            }
                            string[] strChild = strIDs.Split(',');

                            DataSet ds2 = childBll.GetList(" tztypeid in(" + strIDs.Substring(0, strIDs.Length - 1) + ")" + " and loginname='" + loginName + "'");
                            if ((ds2 != null) && ds2.Tables[0].Rows.Count > 0)
                            {
                                for (int c = 0; c < ds2.Tables[0].Rows.Count; c++)
                                {
                                    dr = ds2.Tables[0].Rows[c];
                                    if (!string.IsNullOrEmpty(dr["typeprice"].ToString()) && dr["typeprice"].ToString() != "0" && dr["typeprice"].ToString() != "0.00" && Convert.ToInt32(dr["typeprice"]) != 0)
                                    {
                                        flag = true;
                                        break;
                                    }
                                }
                            }
                        }
                    }
                    str.Append(flag + ",");
                }
            }
            return(str.ToString());
        }
Esempio n. 2
0
        /// <summary>
        /// 投资成本
        ///author: desgin by longbin
        ///createdate: 2011-05-09
        ///description: 根据用户名获取投资成本(index)
        /// </summary>
        /// <param name="loginName"></param>
        /// <returns></returns>
        public string GetInvestListUIByLoginName(string loginName)
        {
            // TzchildTypDAL dal = new TzchildTypDAL();
            TzbigTypeDAL  dal = new TzbigTypeDAL();
            StringBuilder str = new StringBuilder();
            //DataSet ds = dal.GetList(" loginName='" + loginName + "'");
            DataSet ds = dal.GetList("");

            if ((ds != null) && (ds.Tables[0].Rows.Count > 0))
            {
                str.Append("<ul>");
                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                {
                    DataRow dr   = ds.Tables[0].Rows[i];
                    string  str1 = "";
                    if (dr["tztypeName"].ToString().Length > 5)
                    {
                        str1 = dr["tztypeName"].ToString().Substring(0, 5) + "..";
                    }
                    else
                    {
                        str1 = dr["tztypeName"].ToString();
                    }
                    str.Append("<li><a target='_blank' href='http://" + loginName + ".topfo.com/cost.htm'>");
                    str.Append(str1);
                    str.Append("</a></li>");
                }
                str.Append("</ul>");
            }
            return(str.ToString());
        }
Esempio n. 3
0
 /// <summary>
 /// 获得数据列表
 /// </summary>
 public DataSet GetList(string strWhere)
 {
     return(dal.GetList(strWhere));
 }