Ejemplo n.º 1
0
        private void BindOrderDetailData()
        {
            DataTable myTable = orderDetailBLL.GetData(" orderNumber ='" + orderNumber + "'");

            myTable = pg.pagination(myTable, 20, "");

            StringBuilder sb = new StringBuilder();

            foreach (DataRow dr in myTable.Rows)
            {
                sb.AppendFormat("<tr id='tr_{0}'>", dr["ID"].ToString());

                ClassLibrary.Model.Routes route = routeBLL.GetModel(Convert.ToInt32(dr["routeID"]));
                string tmpClassPy = routeClassBll.GetModel(Convert.ToInt32(route.LocationID)).ClassNamePY;

                sb.AppendFormat("<td><a href='/{2}/{1}.html' target='_blank'>{0}</a></td>", dr["RouteName"].ToString(), dr["routeID"].ToString(), tmpClassPy);
                string[] temp = dr["Number"].ToString().Split(',');
                sb.AppendFormat("<td>{0}</td>", temp[0] + "大" + temp[1] + "小");
                //sb.AppendFormat("<td><input id='price_{0}' type='text' size='10' value='{1}' /><input type='button' class='button' value='修改' onclick='UpdateOrderDetailPrice({0},{2})' /></td>", dr["ID"].ToString(), Convert.ToInt32(dr["RoutePrice"]), dr["ordernumber"].ToString());
                sb.AppendFormat("<td>&yen;{0}元</td>", Convert.ToInt32(dr["RoutePrice"]));
                sb.AppendFormat("<td>{0}</td>", dr["RouteTime"].ToString());
                sb.AppendFormat("<td>{0}</td>", dr["StartTime"].ToString());
                sb.AppendFormat("<td>{0}</td>", dr["CreatedTime"].ToString());
                sb.Append("</tr>");
            }

            dataOrderDetailList = sb.ToString();
        }
Ejemplo n.º 2
0
        private void BindData(string sql)
        {
            DataTable myTable = routeCommentBLL.GetData(sql);

            myTable  = pg.pagination(myTable, 20, "");
            pageInfo = pg.pageNumList;

            StringBuilder sb = new StringBuilder();

            foreach (DataRow dr in myTable.Rows)
            {
                sb.AppendFormat("<tr id='tr_{0}'>", dr["ID"].ToString());
                ClassLibrary.Model.Routes rmodel = routeBLL.GetModel(Convert.ToInt32(dr["routeId"]));
                string tmpClassPy = rcList.Find(delegate(ClassLibrary.Model.RouteClass rcm) { return(rcm.ID == rmodel.LocationID); }).ClassNamePY;

                sb.AppendFormat("<td><a href='/{2}/{1}.html' target='_blank'>{0}</a></td>", Function.Clip(GetRoute(Convert.ToInt32(dr["routeID"])), 10, true), Convert.ToInt32(dr["routeID"]), tmpClassPy);
                sb.AppendFormat("<td>{0}</td>", Convert.ToInt16(dr["Grade"].ToString()));
                sb.AppendFormat("<td>{0}</td>", dr["UserName"].ToString());
                sb.AppendFormat("<td>{0}</td>", dr["Nickname"].ToString());
                sb.AppendFormat("<td>{0}</td>", dr["Email"].ToString());
                sb.AppendFormat("<td>{0}</td>", Convert.ToBoolean(dr["Checked"]) ? "<span class='green'>是</span>" : "<span class='red'>否</span>");
                sb.AppendFormat("<td>{0}</td>", dr["CreatedTime"].ToString());
                sb.Append("<td>");
                if (!Convert.ToBoolean(dr["Checked"]))
                {
                    sb.AppendFormat("<a href='RouteCommentList.aspx?ID={0}'>审核</a> ", dr["ID"].ToString());
                }
                else
                {
                    sb.Append("   ");
                }
                sb.AppendFormat("<a href='RouteCommentDetail.aspx?id={0}'>查看</a> ", dr["ID"].ToString());
                sb.AppendFormat("<a href='javascript:void(0)' onclick='routeCommentDelete({0})'>删除</a>", dr["ID"].ToString());
                sb.Append("</td>");

                sb.Append("</tr>");
            }
            dataRouteCommentList = sb.ToString();
        }
Ejemplo n.º 3
0
        private void BindData()
        {
            DataTable myTable = ordersBLL.GetData("");

            myTable  = pg.pagination(myTable, 20, "");
            pageInfo = pg.pageNumList;

            StringBuilder sb = new StringBuilder();

            foreach (DataRow dr in myTable.Rows)
            {
                sb.AppendFormat("<tr id='tr_{0}'>", dr["OrderNumber"].ToString());

                sb.AppendFormat("<td>{0}</td>", dr["OrderNumber"].ToString());

                sb.AppendFormat("<td>{0}</td>", dr["UserName"].ToString());
                string[] temp = dr["proQuantity"].ToString().Split(',');
                sb.AppendFormat("<td>{0}</td>", temp[0] + "大" + temp[1] + "小");
                sb.AppendFormat("<td>&yen;{0}元</td>", Convert.ToInt32(dr["proTotalPrice"]));
                sb.AppendFormat("<td>{0}</td>", dr["Linkman"].ToString());
                sb.AppendFormat("<td>{0}</td>", dr["ContractType"].ToString());
                sb.AppendFormat("<td>{0}</td>", dr["Payment"].ToString());
                sb.AppendFormat("<td>{0}</td>", dr["Status"].ToString());
                sb.AppendFormat("<td>{0}</td>", dr["CreatedTime"].ToString());
                sb.Append("<td>");

                sb.AppendFormat("<a href='OrdersDetail.aspx?id={0}'>查看</a> ", dr["OrderNumber"].ToString());

                if (dr["Status"].ToString() == "未处理")
                {
                    sb.AppendFormat("<a href='javascript:void(0)' onclick='ordersDelete({0})'>删除</a>", dr["OrderNumber"].ToString());
                }
                sb.Append("</td>");

                sb.Append("</tr>");
            }
            dataOrdersList = sb.ToString();
        }