Пример #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            /* if (Request.QueryString["User_id"] == null)
               {
               Response.Write("<script>window.alert('您没有选择用户,无法传值');window.location=index.aspx;</script>");
               }
               else
               {*/
            RadButton2.Visible = false;
            RadButton3.Visible = false;
            ViewState["BackUrl"] = Request.UrlReferrer.ToString();
            string a = Request.QueryString["Order_ID"].ToString();
            modOrder_GB = bllOrder_GB.GetModel(Convert.ToInt16(a));
            Order_ID.Text = modOrder_GB.Order_ID.ToString();
            DataTable dt = bllOrder_GB.GetList_1(a).Tables[0];
            if (dt.Rows.Count > 0)
            {
                goodsname.Text = dt.Rows[0]["goods_name"].ToString();
                Nickname.Text = dt.Rows[0]["Nickname"].ToString();

                Order_time.Text = dt.Rows[0]["Order_time"].ToString();
                Order_status.Text = dt.Rows[0]["Order_status"].ToString();
                TextBox4.Text = dt.Rows[0]["Order_status"].ToString();

                Order_name.Text = dt.Rows[0]["Order_name"].ToString();
                Order_zipcode.Text = dt.Rows[0]["Order_zipcode"].ToString();

                Order_address.Text = dt.Rows[0]["Order_address"].ToString();
                Order_phone.Text = dt.Rows[0]["Order_phone"].ToString();

                Order_way.Text = dt.Rows[0]["Order_way"].ToString();
                Num.Text = dt.Rows[0]["Num"].ToString();

                Style.Text = dt.Rows[0]["Style"].ToString();

                // }
            }
        }
Пример #2
0
 /// <summary>
 /// 得到一个对象实体
 /// </summary>
 public TtNum1.Model.Order_GB GetModel(int Order_ID)
 {
     StringBuilder strSql=new StringBuilder();
     strSql.Append("select  top 1  ");
     strSql.Append(" Order_ID,U_ID,Order_time,Order_status,Order_name,Order_zipcode,Order_address,Order_phone,Order_way,Order_message,num,style,good_id,GroupBuying_id ");
     strSql.Append(" from Order_GB ");
     strSql.Append(" where Order_ID="+Order_ID+"" );
     TtNum1.Model.Order_GB model=new TtNum1.Model.Order_GB();
     DataSet ds=DbHelperSQL.Query(strSql.ToString());
     if(ds.Tables[0].Rows.Count>0)
     {
         return DataRowToModel(ds.Tables[0].Rows[0]);
     }
     else
     {
         return null;
     }
 }
Пример #3
0
 /// <summary>
 /// 得到一个对象实体
 /// </summary>
 public TtNum1.Model.Order_GB DataRowToModel(DataRow row)
 {
     TtNum1.Model.Order_GB model=new TtNum1.Model.Order_GB();
     if (row != null)
     {
         if(row["Order_ID"]!=null && row["Order_ID"].ToString()!="")
         {
             model.Order_ID=int.Parse(row["Order_ID"].ToString());
         }
         if(row["U_ID"]!=null && row["U_ID"].ToString()!="")
         {
             model.U_ID=int.Parse(row["U_ID"].ToString());
         }
         if(row["Order_time"]!=null && row["Order_time"].ToString()!="")
         {
             model.Order_time=DateTime.Parse(row["Order_time"].ToString());
         }
         if(row["Order_status"]!=null)
         {
             model.Order_status=row["Order_status"].ToString();
         }
         if(row["Order_name"]!=null)
         {
             model.Order_name=row["Order_name"].ToString();
         }
         if(row["Order_zipcode"]!=null)
         {
             model.Order_zipcode=row["Order_zipcode"].ToString();
         }
         if(row["Order_address"]!=null)
         {
             model.Order_address=row["Order_address"].ToString();
         }
         if(row["Order_phone"]!=null)
         {
             model.Order_phone=row["Order_phone"].ToString();
         }
         if(row["Order_way"]!=null)
         {
             model.Order_way=row["Order_way"].ToString();
         }
         if(row["Order_message"]!=null)
         {
             model.Order_message=row["Order_message"].ToString();
         }
         if(row["num"]!=null && row["num"].ToString()!="")
         {
             model.num=int.Parse(row["num"].ToString());
         }
         if(row["style"]!=null)
         {
             model.style=row["style"].ToString();
         }
         if(row["good_id"]!=null && row["good_id"].ToString()!="")
         {
             model.good_id=int.Parse(row["good_id"].ToString());
         }
         if(row["GroupBuying_id"]!=null && row["GroupBuying_id"].ToString()!="")
         {
             model.GroupBuying_id=int.Parse(row["GroupBuying_id"].ToString());
         }
     }
     return model;
 }
Пример #4
0
        public TtNum1.Model.Order_GB GetModel_3(string order_id)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select GoodsInfo.goods_id  FROM Order_GB,GoodsInfo,userinfo where Order_GB.good_id= GoodsInfo.Goods_ID and Order_GB.U_ID=userinfo.User_ID and ");

            strSql.Append("  Order_GB.Order_ID =" + order_id + "");
            TtNum1.Model.Order_GB model = new TtNum1.Model.Order_GB();
            DataSet ds = DbHelperSQL.Query(strSql.ToString());
            if (ds.Tables[0].Rows.Count > 0)
            {
                return DataRowToModel_4(ds.Tables[0].Rows[0]);
            }
            else
            {
                return null;
            }
        }
Пример #5
0
        /*
        */
        /// <summary>
        /// 后台方法
        /// </summary>
        /// <param name="order_id"></param>
        /// <returns></returns>
        public TtNum1.Model.Order_GB GetModel_4(string order_id)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append(" select Order_GB.Order_status from Order_GB where");

            strSql.Append("  Order_GB.Order_ID=" + order_id + "");
            TtNum1.Model.Order_GB model = new TtNum1.Model.Order_GB();
            DataSet ds = DbHelperSQL.Query(strSql.ToString());
            if (ds.Tables[0].Rows.Count > 0)
            {
                return DataRowToModel_5(ds.Tables[0].Rows[0]);
            }
            else
            {
                return null;
            }
        }
Пример #6
0
        public TtNum1.Model.Order_GB GetModel_1(string good_id)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append(" select count(*) FROM Order_GB,goodsinfo,userinfo  where  goodsinfo.goods_id=order_GB.good_id and userinfo.User_ID=Order_GB.U_ID and ");

            strSql.Append(" good_id =" + good_id + "");
            TtNum1.Model.Order_GB model = new TtNum1.Model.Order_GB();
            DataSet ds = DbHelperSQL.Query(strSql.ToString());
            if (ds.Tables[0].Rows.Count > 0)
            {
                return DataRowToModel_2(ds.Tables[0].Rows[0]);
            }
            else
            {
                return null;
            }
        }
Пример #7
0
        public TtNum1.Model.Order_GB GetModel_2(string good_id)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append(" select  groupbuying.GB_participantsNumber from groupbuying,goodsinfo where goodsinfo.Goods_ID=groupbuying.GB_GoodsID and ");

            strSql.Append(" groupbuying.GB_GoodsID=" + good_id + "");
            TtNum1.Model.Order_GB model = new TtNum1.Model.Order_GB();
            DataSet ds = DbHelperSQL.Query(strSql.ToString());
            if (ds.Tables[0].Rows.Count > 0)
            {
                return DataRowToModel_3(ds.Tables[0].Rows[0]);
            }
            else
            {
                return null;
            }
        }
Пример #8
0
 /// <summary>
 /// 得到一个对象实体
 /// </summary>
 public TtNum1.Model.Order_GB GetModel(int Order_ID)
 {
     StringBuilder strSql=new StringBuilder();
     strSql.Append("select  top 1  ");
     strSql.Append(" Order_ID,U_ID,Order_time,Order_status,Order_name,Order_zipcode,Order_address,Order_phone,Order_way,Order_message,num,style,good_id,GroupBuying_id ");
     strSql.Append(" from Order_GB ");
     strSql.Append(" where Order_ID="+Order_ID+"" );
     TtNum1.Model.Order_GB model=new TtNum1.Model.Order_GB();
     DataSet ds=DbHelperSQL.Query(strSql.ToString());
     if(ds.Tables[0].Rows.Count>0)
     {
         if(ds.Tables[0].Rows[0]["Order_ID"]!=null && ds.Tables[0].Rows[0]["Order_ID"].ToString()!="")
         {
             model.Order_ID=int.Parse(ds.Tables[0].Rows[0]["Order_ID"].ToString());
         }
         if(ds.Tables[0].Rows[0]["U_ID"]!=null && ds.Tables[0].Rows[0]["U_ID"].ToString()!="")
         {
             model.U_ID=int.Parse(ds.Tables[0].Rows[0]["U_ID"].ToString());
         }
         if(ds.Tables[0].Rows[0]["Order_time"]!=null && ds.Tables[0].Rows[0]["Order_time"].ToString()!="")
         {
             model.Order_time=DateTime.Parse(ds.Tables[0].Rows[0]["Order_time"].ToString());
         }
         if(ds.Tables[0].Rows[0]["Order_status"]!=null && ds.Tables[0].Rows[0]["Order_status"].ToString()!="")
         {
             model.Order_status=ds.Tables[0].Rows[0]["Order_status"].ToString();
         }
         if(ds.Tables[0].Rows[0]["Order_name"]!=null && ds.Tables[0].Rows[0]["Order_name"].ToString()!="")
         {
             model.Order_name=ds.Tables[0].Rows[0]["Order_name"].ToString();
         }
         if(ds.Tables[0].Rows[0]["Order_zipcode"]!=null && ds.Tables[0].Rows[0]["Order_zipcode"].ToString()!="")
         {
             model.Order_zipcode=ds.Tables[0].Rows[0]["Order_zipcode"].ToString();
         }
         if(ds.Tables[0].Rows[0]["Order_address"]!=null && ds.Tables[0].Rows[0]["Order_address"].ToString()!="")
         {
             model.Order_address=ds.Tables[0].Rows[0]["Order_address"].ToString();
         }
         if(ds.Tables[0].Rows[0]["Order_phone"]!=null && ds.Tables[0].Rows[0]["Order_phone"].ToString()!="")
         {
             model.Order_phone=ds.Tables[0].Rows[0]["Order_phone"].ToString();
         }
         if(ds.Tables[0].Rows[0]["Order_way"]!=null && ds.Tables[0].Rows[0]["Order_way"].ToString()!="")
         {
             model.Order_way=ds.Tables[0].Rows[0]["Order_way"].ToString();
         }
         if(ds.Tables[0].Rows[0]["Order_message"]!=null && ds.Tables[0].Rows[0]["Order_message"].ToString()!="")
         {
             model.Order_message=ds.Tables[0].Rows[0]["Order_message"].ToString();
         }
         if(ds.Tables[0].Rows[0]["num"]!=null && ds.Tables[0].Rows[0]["num"].ToString()!="")
         {
             model.num=int.Parse(ds.Tables[0].Rows[0]["num"].ToString());
         }
         if(ds.Tables[0].Rows[0]["style"]!=null && ds.Tables[0].Rows[0]["style"].ToString()!="")
         {
             model.style=ds.Tables[0].Rows[0]["style"].ToString();
         }
         if(ds.Tables[0].Rows[0]["good_id"]!=null && ds.Tables[0].Rows[0]["good_id"].ToString()!="")
         {
             model.good_id=int.Parse(ds.Tables[0].Rows[0]["good_id"].ToString());
         }
         if(ds.Tables[0].Rows[0]["GroupBuying_id"]!=null && ds.Tables[0].Rows[0]["GroupBuying_id"].ToString()!="")
         {
             model.GroupBuying_id=int.Parse(ds.Tables[0].Rows[0]["GroupBuying_id"].ToString());
         }
         return model;
     }
     else
     {
         return null;
     }
 }
Пример #9
0
        public TtNum1.Model.Order_GB DataRowToModel_5(DataRow row)
        {
            TtNum1.Model.Order_GB model = new TtNum1.Model.Order_GB();
            if (row != null)
            {
                if (row[0] != null && row[0].ToString() != "")
                {
                    string a = row[0].ToString();
                    model.Order_status = a;
                }

            }
            return model;
        }
Пример #10
0
        public TtNum1.Model.Order_GB DataRowToModel_4(DataRow row)
        {
            TtNum1.Model.Order_GB model = new TtNum1.Model.Order_GB();
            if (row != null)
            {
                if (row[0] != null && row[0].ToString() != "")
                {
                    string a = row[0].ToString();
                    model.good_id = Convert.ToInt32(a);
                }

            }
            return model;
        }
Пример #11
0
        public TtNum1.Model.Order_GB DataRowToModel_3(DataRow row)
        {
            TtNum1.Model.Order_GB model = new TtNum1.Model.Order_GB();
            if (row != null)
            {
                if (row[0] != null && row[0].ToString() != "")
                {
                    string a = row[0].ToString();
                    model.GB_participantsNumber = a;
                }

            }
            return model;
        }
Пример #12
0
        public TtNum1.Model.Order_GB DataRowToModel_2(DataRow row)
        {
            TtNum1.Model.Order_GB model = new TtNum1.Model.Order_GB();
            if (row != null)
            {
                if (row[0] != null && row[0].ToString() != "")
                {
                    int a = int.Parse(row[0].ToString());
                    model.count = a;
                }

            }
            return model;
        }