Exemple #1
0
        //查询
        protected void Button1_Click(object sender, EventArgs e)
        {
            string name = this.txlinkman.Text;
            string xingm = this.txlogin.Text;
            QPS.NEW.BLL.Enterprise ep = new QPS.NEW.BLL.Enterprise();
            ds = ep.GetList(" Username='******' or Nickname='" + xingm + "'");
            dgExamProj.DataSource = ds;
            dgExamProj.DataBind();

        }
Exemple #2
0
        //查询
        protected void Button1_Click(object sender, EventArgs e)
        {
            string name  = this.txlinkman.Text;
            string xingm = this.txlogin.Text;

            QPS.NEW.BLL.Enterprise ep = new QPS.NEW.BLL.Enterprise();
            ds = ep.GetList(" Username='******' or Nickname='" + xingm + "'");
            dgExamProj.DataSource = ds;
            dgExamProj.DataBind();
        }
        protected void btnLogin_Click(object sender, EventArgs e)
        {
            string UserName = txbUserName.Text.Trim();
            string UserPwd  = txbPwd.Text.Trim();

            QPS.NEW.BLL.Users bll = new QPS.NEW.BLL.Users();

            try
            {
                if (rbtuser.Checked)
                {
                    UserPwd = QPS.NEW.BLL.MD5Helper.Encode(UserPwd);
                    if (bll.Denglu(UserName, UserPwd) && txbCode.Text.Trim().Equals(Session["code"]))
                    {
                        Session["username"] = UserName;
                        Response.Redirect("MainPage.aspx", false);
                        MainMaser m = new MainMaser();
                        MainPage  d = new MainPage();
                        Hashtable t = new Hashtable();
                        t.Add("username", UserName);
                        t.Add("password", UserPwd);
                        m.hashtable = t;
                        d.hashtable = t;
                    }
                }
                if (rbtBusiuser.Checked)
                {
                    QPS.NEW.BLL.Enterprise enter = new QPS.NEW.BLL.Enterprise();
                    UserPwd = QPS.NEW.BLL.MD5Helper.Encode(UserPwd);
                    DataSet ds = enter.GetList("Username='******'and Password='******'");
                    if (ds.Tables[0].Rows.Count > 0 && txbCode.Text.Trim().Equals(Session["code"]) && ds.Tables[0].Rows[0]["IfChecked"].ToString() == "1")
                    {
                        Session["username"] = UserName;
                        Response.Redirect("BusiMan/orderMan.aspx", false);
                        MainMaser m = new MainMaser();
                        MainPage  d = new MainPage();
                        Hashtable t = new Hashtable();
                        t.Add("username", UserName);
                        t.Add("password", UserPwd);
                        m.hashtable = t;
                        d.hashtable = t;
                    }
                }
                if (Session["username"] == null)
                {
                    Response.Write("<script>alert(' 登录失败!')</script>");
                    return;
                }
            }
            catch (Exception ex)
            {
                Response.Write("<script>alert(' 登录失败!+" + ex.ToString() + "')</script>");
                return;
            }
        }
Exemple #4
0
 protected void btnLogin_Click(object sender, EventArgs e)
 {
     string UserName = txbUserName.Text.Trim();
     string UserPwd = txbPwd.Text.Trim();
     QPS.NEW.BLL.Users bll = new QPS.NEW.BLL.Users();
     
     try
     {
         if (rbtuser.Checked)
         {
             UserPwd = QPS.NEW.BLL.MD5Helper.Encode(UserPwd);
             if (bll.Denglu(UserName, UserPwd) && txbCode.Text.Trim().Equals(Session["code"]))
             {
                 Session["username"] = UserName;
                 Response.Redirect("MainPage.aspx", false);
                 MainMaser m = new MainMaser();
                 MainPage d = new MainPage();
                 Hashtable t = new Hashtable();
                 t.Add("username", UserName);
                 t.Add("password", UserPwd);
                 m.hashtable = t;
                 d.hashtable = t;
             }
         }
         if (rbtBusiuser.Checked)
         {
             QPS.NEW.BLL.Enterprise enter = new QPS.NEW.BLL.Enterprise();
             UserPwd = QPS.NEW.BLL.MD5Helper.Encode(UserPwd);
             DataSet ds = enter.GetList("Username='******'and Password='******'");
             if (ds.Tables[0].Rows.Count > 0 && txbCode.Text.Trim().Equals(Session["code"]) && ds.Tables[0].Rows[0]["IfChecked"].ToString() == "1")
             {
                 Session["username"] = UserName;
                 Response.Redirect("BusiMan/orderMan.aspx", false);
                 MainMaser m = new MainMaser();
                 MainPage d = new MainPage();
                 Hashtable t = new Hashtable();
                 t.Add("username", UserName);
                 t.Add("password", UserPwd);
                 m.hashtable = t;
                 d.hashtable = t;
             }
         }
         if (Session["username"] == null)
         {
             Response.Write("<script>alert(' 登录失败!')</script>");
             return;
         }
     }
     catch (Exception ex)
     {
         Response.Write("<script>alert(' 登录失败!+" + ex.ToString() + "')</script>");
         return;
     }
 }
Exemple #5
0
        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);
        }
Exemple #6
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         if (Session["username"] != null)
         {
             string  uname  = Session["username"].ToString();
             DataSet dsUser = user.GetList("Username='******'");
             userid = Convert.ToInt32(dsUser.Tables[0].Rows[0]["Id"]);
         }
     }
 }
Exemple #7
0
        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;
        }
Exemple #8
0
 public void databind(GridView gdv)
 {
     QPS.NEW.BLL.Enterprise user = new QPS.NEW.BLL.Enterprise();
     QPS.NEW.Model.Room Mroom = new QPS.NEW.Model.Room();
     QPS.NEW.BLL.Room Broom = new QPS.NEW.BLL.Room();
     QPS.NEW.BLL.Orderform Border = new QPS.NEW.BLL.Orderform();
     List<QPS.NEW.Model.Room> roomList = new List<QPS.NEW.Model.Room>();
     if (Session["username"] != null)
     {
         string uname = Session["username"].ToString();
         DataSet dsUser = user.GetList("Username='******'");
         int uid = Convert.ToInt32(dsUser.Tables[0].Rows[0]["Id"]);
         roomList = Broom.GetModelList("OwnerID='" + uid + "'");
     }
     gdv.DataSource = Gettable(roomList);
     gdv.DataBind();
 }
Exemple #9
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         if (Session["username"] != null)
         {
             string uname = Session["username"].ToString();
             txfUserName.Value = uname;
             DataSet dsUser = Benter.GetList("Username='******'");
             txfPhone.Value    = dsUser.Tables[0].Rows[0]["Phone"].ToString();
             txfEmail.Value    = dsUser.Tables[0].Rows[0]["Mail"].ToString();
             txfNickName.Value = dsUser.Tables[0].Rows[0]["NickName"].ToString();
             txfAddress.Value  = dsUser.Tables[0].Rows[0]["Address"].ToString();
             userid            = Convert.ToInt32(dsUser.Tables[0].Rows[0]["Id"]);
         }
     }
 }
Exemple #10
0
        public void databind(GridView gdv)
        {
            QPS.NEW.BLL.Enterprise    user     = new QPS.NEW.BLL.Enterprise();
            QPS.NEW.Model.Room        Mroom    = new QPS.NEW.Model.Room();
            QPS.NEW.BLL.Room          Broom    = new QPS.NEW.BLL.Room();
            QPS.NEW.BLL.Orderform     Border   = new QPS.NEW.BLL.Orderform();
            List <QPS.NEW.Model.Room> roomList = new List <QPS.NEW.Model.Room>();

            if (Session["username"] != null)
            {
                string  uname  = Session["username"].ToString();
                DataSet dsUser = user.GetList("Username='******'");
                int     uid    = Convert.ToInt32(dsUser.Tables[0].Rows[0]["Id"]);
                roomList = Broom.GetModelList("OwnerID='" + uid + "'");
            }
            gdv.DataSource = Gettable(roomList);
            gdv.DataBind();
        }
Exemple #11
0
        public DataTable  Gettable()
        {
            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.Model.Room             Mroom     = new QPS.NEW.Model.Room();
            QPS.NEW.BLL.Room               Broom     = new QPS.NEW.BLL.Room();
            QPS.NEW.BLL.Orderform          Border    = new QPS.NEW.BLL.Orderform();
            QPS.NEW.BLL.Integral           Bint      = new QPS.NEW.BLL.Integral();
            List <QPS.NEW.Model.Room>      roomList  = new List <QPS.NEW.Model.Room>();
            List <QPS.NEW.Model.Orderform> orderlist = new List <QPS.NEW.Model.Orderform>();
            //创建新列

            //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(string));

            //DataColumn dc4 = dt.Columns.Add("消费时间", typeof(string));
            if (Session["username"] != null)
            {
                //获取Uid
                string  uname  = Session["username"].ToString();
                DataSet dsUser = user.GetList("Username='******'");
                int     uid    = Convert.ToInt32(dsUser.Tables[0].Rows[0]["Id"]);



                QPS.NEW.Model.Integral mInt = new NEW.Model.Integral();
                mInt = Bint.GetModel(uid);
                if (mInt != null)
                {
                    DataRow dr = dt.NewRow();
                    dr[0] = uname;
                    dr[1] = mInt.TotalMoney.ToString();
                    dt.Rows.Add(dr);
                }
            }
            return(dt);
        }
Exemple #12
0
        public DataTable  Gettable()
        {   
            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.Model.Room Mroom = new QPS.NEW.Model.Room();
            QPS.NEW.BLL.Room Broom = new QPS.NEW.BLL.Room();
            QPS.NEW.BLL.Orderform Border = new QPS.NEW.BLL.Orderform();
            QPS.NEW.BLL.Integral Bint = new QPS.NEW.BLL.Integral();
            List<QPS.NEW.Model.Room> roomList = new List<QPS.NEW.Model.Room>();
            List<QPS.NEW.Model.Orderform> orderlist = new List<QPS.NEW.Model.Orderform>();
            //创建新列

            //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(string));
            //DataColumn dc4 = dt.Columns.Add("消费时间", typeof(string));
            if (Session["username"] != null)
            {
                //获取Uid
                string uname = Session["username"].ToString();
                DataSet dsUser = user.GetList("Username='******'");
                int uid = Convert.ToInt32(dsUser.Tables[0].Rows[0]["Id"]);



                QPS.NEW.Model.Integral mInt = new NEW.Model.Integral();
                mInt = Bint.GetModel(uid);
                if (mInt != null)
                {
                    DataRow dr = dt.NewRow();
                    dr[0] = uname;
                    dr[1] = mInt.TotalMoney.ToString();
                    dt.Rows.Add(dr);
                }

           }
                    return dt;
        }