コード例 #1
0
 protected void DataList2_ItemCommand(object source, DataListCommandEventArgs e)
 {
     if (e.CommandName == "order")
     {
         string s = e.CommandArgument.ToString();
         ds = room.GetList("Are='" + s + "' and IfRecommend=1 and IfExamine=1");
         DataList1.DataSource = ds;
         DataList1.DataBind();
     }
 }
コード例 #2
0
ファイル: Order.aspx.cs プロジェクト: hackerlank/robinerp
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                this.Calendar1.SelectedDate = DateTime.Now;
                this.Calendar2.SelectedDate = DateTime.Now;

                roomid = Int32.Parse(Request.QueryString["id"].Trim());
                StringBuilder sb = new StringBuilder();
                sb.Append("Id=");
                sb.Append(roomid);
                ds = room.GetList(sb.ToString());
                DataList1.DataSource = ds;
                DataList1.DataBind();
                if (Session["username"] != null)
                {
                    string uname = Session["username"].ToString();
                    txbOrderPersonInfo.Text = uname;
                    DataSet dsUser = user.GetList(uname);
                    if (dsUser.Tables[0].Rows[0]["Phone"].ToString() != "")
                    {
                        txbPhone.Text = dsUser.Tables[0].Rows[0]["Phone"].ToString();
                    }

                    userid = Convert.ToInt32(dsUser.Tables[0].Rows[0]["UserID"]);
                }
            }
        }
コード例 #3
0
ファイル: Qps.aspx.cs プロジェクト: lincoln56/robinerp
 /// <summary>
 /// 查询
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void Button1_Click(object sender, EventArgs e)
 {
     string name = this.txtName.Text;
     string Type = this.txtType.Text;
     QPS.NEW.BLL.Room rm = new QPS.NEW.BLL.Room();
     ds = rm.GetList(" Name='" + name + "' or RoomType='" + Type + "'");
     dgExamProj.DataSource = ds;
     dgExamProj.DataBind();
 }
コード例 #4
0
ファイル: Qps.aspx.cs プロジェクト: hackerlank/robinerp
        /// <summary>
        /// 查询
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Button1_Click(object sender, EventArgs e)
        {
            string name = this.txtName.Text;
            string Type = this.txtType.Text;

            QPS.NEW.BLL.Room rm = new QPS.NEW.BLL.Room();
            ds = rm.GetList(" Name='" + name + "' or RoomType='" + Type + "'");
            dgExamProj.DataSource = ds;
            dgExamProj.DataBind();
        }
コード例 #5
0
ファイル: Qps.aspx.cs プロジェクト: hackerlank/robinerp
        //查询(价格 地域)
        protected void Button3_Click(object sender, EventArgs e)
        {
            string Price = this.TextPrice.Text;
            string Are   = this.TextAre.Text;

            QPS.NEW.BLL.Room rm = new QPS.NEW.BLL.Room();
            ds = rm.GetList(" RoomPrice='" + Price + "' or Are='" + Are + "'");
            dgExamProj.DataSource = ds;
            dgExamProj.DataBind();
        }
コード例 #6
0
ファイル: orderMan.aspx.cs プロジェクト: hackerlank/robinerp
        public DataTable databind()
        {
            DataTable dt = new DataTable();

            QPS.NEW.BLL.Enterprise         user      = new QPS.NEW.BLL.Enterprise();
            QPS.NEW.BLL.Users              u         = new QPS.NEW.BLL.Users();
            QPS.NEW.BLL.Room               BRoom     = new QPS.NEW.BLL.Room();
            QPS.NEW.Model.Room             Mroom     = new QPS.NEW.Model.Room();
            QPS.NEW.BLL.Orderform          Border    = new QPS.NEW.BLL.Orderform();
            List <QPS.NEW.Model.Room>      roomList  = new List <QPS.NEW.Model.Room>();
            List <QPS.NEW.Model.Orderform> orderList = new List <QPS.NEW.Model.Orderform>();
            List <QPS.NEW.Model.Users>     userList  = new List <QPS.NEW.Model.Users>();
            DataColumn dc0 = dt.Columns.Add("订单编号", typeof(int));
            DataColumn dc1 = dt.Columns.Add("棋牌室名称", typeof(string));
            DataColumn dc2 = dt.Columns.Add("用户", typeof(string));
            DataColumn dc3 = dt.Columns.Add("酒水费", typeof(float));
            DataColumn dc4 = dt.Columns.Add("是否有效", typeof(string));

            dc0.ReadOnly = true;
            dc1.ReadOnly = true;
            dc2.ReadOnly = true;

            DataSet dsUser = user.GetList("Username='******'");

            uid = Convert.ToInt32(dsUser.Tables[0].Rows[0]["Id"]);
            //获取RoomID
            DataSet dsRoom = BRoom.GetList("OwnerID='" + uid + "' ");

            for (int i = 0; i < dsRoom.Tables[0].Rows.Count; i++)
            {
                int roomid                 = Convert.ToInt32(dsRoom.Tables[0].Rows[i]["Id"]);
                QPS.NEW.Model.Room r       = BRoom.GetModel(roomid);
                DataSet            dsOrder = Border.GetList("Roomid='" + roomid + "' and IsDelete=0");
                if (dsOrder.Tables[0].Rows.Count == 0)
                {
                    continue;
                }
                for (int j = 0; j < dsOrder.Tables[0].Rows.Count; j++)
                {
                    DataRow dr = dt.NewRow();
                    dr[1] = r.Name;
                    //订单ID
                    int orderid = Convert.ToInt32(dsOrder.Tables[0].Rows[j]["Id"]);
                    dr[0] = orderid;
                    int    userid   = Convert.ToInt32(dsOrder.Tables[0].Rows[j]["Userid"]);
                    string username = u.GetModel(userid).Username;
                    dr[2] = username;
                    dr[3] = dsOrder.Tables[0].Rows[j]["Beveragecost"];
                    dr[4] = dsOrder.Tables[0].Rows[j]["RoomType"];
                    dt.Rows.Add(dr);
                }
            }
            return(dt);
        }
コード例 #7
0
ファイル: orderMan.aspx.cs プロジェクト: lincoln56/robinerp
        public DataTable databind()
        {
          DataTable dt = new DataTable();

          QPS.NEW.BLL.Enterprise user = new QPS.NEW.BLL.Enterprise();
        QPS.NEW.BLL.Users u = new QPS.NEW.BLL.Users();
        QPS.NEW.BLL.Room BRoom = new QPS.NEW.BLL.Room();
        QPS.NEW.Model.Room Mroom = new QPS.NEW.Model.Room();
        QPS.NEW.BLL.Orderform Border = new QPS.NEW.BLL.Orderform();
        List<QPS.NEW.Model.Room> roomList = new List<QPS.NEW.Model.Room>();
        List<QPS.NEW.Model.Orderform> orderList = new List<QPS.NEW.Model.Orderform>();
        List<QPS.NEW.Model.Users> userList = new List<QPS.NEW.Model.Users>();
         DataColumn dc0 = dt.Columns.Add("订单编号", typeof(int));
        DataColumn dc1 = dt.Columns.Add("棋牌室名称", typeof(string));
        DataColumn dc2 = dt.Columns.Add("用户", typeof(string));
        DataColumn dc3 = dt.Columns.Add("酒水费", typeof(float));
        DataColumn dc4 = dt.Columns.Add("是否有效",typeof(string));
          dc0.ReadOnly = true;
        dc1.ReadOnly = true;
        dc2.ReadOnly = true;
       
         DataSet dsUser = user.GetList("Username='******'");
              uid = Convert.ToInt32(dsUser.Tables[0].Rows[0]["Id"]);
                //获取RoomID
                DataSet dsRoom = BRoom.GetList("OwnerID='"+uid+"' ");
                for (int i = 0; i < dsRoom.Tables[0].Rows.Count; i++)
                {
                    int  roomid =Convert.ToInt32(dsRoom.Tables[0].Rows[i]["Id"]);
                    QPS.NEW.Model.Room r = BRoom.GetModel(roomid);
                    DataSet dsOrder = Border.GetList("Roomid='" + roomid + "' and IsDelete=0");
                    if (dsOrder.Tables[0].Rows.Count == 0)
                        continue;
                    for (int j = 0; j < dsOrder.Tables[0].Rows.Count; j++)
                    {   
                        DataRow dr = dt.NewRow();
                        dr[1] = r.Name;
                        //订单ID
                        int orderid = Convert.ToInt32(dsOrder.Tables[0].Rows[j]["Id"]);
                        dr[0] = orderid;
                        int userid = Convert.ToInt32(dsOrder.Tables[0].Rows[j]["Userid"]);
                        string username=  u.GetModel(userid).Username;
                        dr[2]=username;
                        dr[3] = dsOrder.Tables[0].Rows[j]["Beveragecost"]; 
                        dr[4]=dsOrder.Tables[0].Rows[j]["RoomType"];
                        dt.Rows.Add(dr);
                    }                  
        }
            return dt;
        }
コード例 #8
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         int           id = Int32.Parse(Request.QueryString["id"].Trim());
         StringBuilder sb = new StringBuilder();
         sb.Append("Id=");
         sb.Append(id);
         ds = room.GetList(sb.ToString());
         DataList2.DataSource = ds;
         DataList2.DataBind();
         DataList1.DataSource = ds;
         DataList1.DataBind();
     }
 }
コード例 #9
0
        public void BindShow()
        {
            DataSet dse = new DataSet();

            QPS.NEW.BLL.Room rm = new QPS.NEW.BLL.Room();
            dse = rm.GetList("  id =" + tempID + " ");

            this.txName.Text          = dse.Tables[0].Rows[0]["Name"].ToString();
            this.ddlCat.SelectedValue = dse.Tables[0].Rows[0]["roomType"].ToString();
            this.Textprice.Text       = dse.Tables[0].Rows[0]["roomPrice"].ToString();
            this.TextAre.Text         = dse.Tables[0].Rows[0]["Are"].ToString();
            this.TextAddress.Text     = dse.Tables[0].Rows[0]["Address"].ToString();
            //图片
            //this.upfile.Text = dse.Tables[0].Rows[0]["imagePath"].ToString();
            this.Photo.Text        = dse.Tables[0].Rows[0]["imagePath"].ToString();
            this.Rec.Checked       = Convert.ToInt32(dse.Tables[0].Rows[0]["IfRecommend"]) == 0 ? true : false;
            this.FileContent.Value = dse.Tables[0].Rows[0]["Content"].ToString();
        }
コード例 #10
0
ファイル: Qps.aspx.cs プロジェクト: lincoln56/robinerp
 //查询(价格 地域)
 protected void Button3_Click(object sender, EventArgs e)
 {
     string Price = this.TextPrice.Text;
     string Are = this.TextAre.Text;
     QPS.NEW.BLL.Room rm = new QPS.NEW.BLL.Room();
     ds = rm.GetList(" RoomPrice='" + Price + "' or Are='" + Are + "'");
     dgExamProj.DataSource = ds;
     dgExamProj.DataBind();
 }