コード例 #1
0
ファイル: JfXiuGai.aspx.cs プロジェクト: lincoln56/robinerp
        public void BindShow()
        {
            DataSet dse = new DataSet();
            QPS.NEW.BLL.Integral rm = new QPS.NEW.BLL.Integral();
            dse = rm.GetList("  UserID =" + tempID + " ");
            this.txtName.Text = dse.Tables[0].Rows[0]["UserID"].ToString();

            //this.txtTime.Text = dse.Tables[0].Rows[0]["CreateTime"].ToString();

            this.txtJiFen.Text = dse.Tables[0].Rows[0]["TotalMoney"].ToString();

            //this.txtRoom.Text = dse.Tables[0].Rows[0]["RoomId"].ToString();
        }
コード例 #2
0
ファイル: JfXiuGai.aspx.cs プロジェクト: hackerlank/robinerp
        public void BindShow()
        {
            DataSet dse = new DataSet();

            QPS.NEW.BLL.Integral rm = new QPS.NEW.BLL.Integral();
            dse = rm.GetList("  UserID =" + tempID + " ");
            this.txtName.Text = dse.Tables[0].Rows[0]["UserID"].ToString();

            //this.txtTime.Text = dse.Tables[0].Rows[0]["CreateTime"].ToString();

            this.txtJiFen.Text = dse.Tables[0].Rows[0]["TotalMoney"].ToString();

            //this.txtRoom.Text = dse.Tables[0].Rows[0]["RoomId"].ToString();
        }
コード例 #3
0
ファイル: orderMan.aspx.cs プロジェクト: lincoln56/robinerp
        protected void gdvOrder_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            ////得到单位编号
            //string rowUpdate = this.gdvOrder.DataKeys[].Values[0].ToString();
            ////转换为整数
            //int ID = Convert.ToInt32(rowUpdate);
            //QPS.BLL.Orderform Border = new QPS.BLL.Orderform();
            //QPS.Model.Orderform Morder = new QPS.Model.Orderform();
            //Morder.Id = ID;
            //Morder.Beveragecost = (decimal)this.gdvOrder.DataKeys[e.RowIndex].Values[3];
            //Border.Update(Morder);
            //gdvOrder.DataSource = databind();
            //gdvOrder.DataBind();
            string strArgument = e.CommandArgument.ToString();
            if (e.CommandName == "IsValidate")
            {
                string[] Argument = strArgument.Split('|');
                string id = Argument[0].ToString();

                string type = Argument[1].ToString();
                int ok;
                if (type == "0")
                { 
                    ok = 1; 
                }
                else 
                {
                    ok = 0; 
                }

                QPS.NEW.BLL.Orderform Border = new QPS.NEW.BLL.Orderform();
                QPS.NEW.Model.Orderform order = Border.GetModel(Convert.ToInt32(id));
                Border.UpdateType(id,type);
                //订单有效 则加上积分  否则 如果存在积分 则删除
                QPS.NEW.BLL.Integral Bint = new QPS.NEW.BLL.Integral();
                QPS.NEW.Model.Integral Mint = new QPS.NEW.Model.Integral();
                     if (Bint.GetList("OrderId='" + id + "'").Tables[0].Rows.Count > 0)//删除已有积分
                    {
                        Bint.Delete(Convert.ToInt32(Bint.GetList("OrderId='" + id + "'").Tables[0].Rows[0]["Id"]));
                    }
                if (ok == 1)//有效
                {
                    QPS.NEW.BLL.Room Broom = new QPS.NEW.BLL.Room();
                    QPS.NEW.Model.Room r = Broom.GetModel(order.Roomid);
                        //Mint.OrderId = Convert.ToInt32(id);
                        //Mint.RoomId = order.Roomid;
                        Mint.UserID = order.Userid;
                        //Mint.CreateTime = order.StartTime;
                        TimeSpan ts = (TimeSpan)(order.endTime - order.StartTime);
                        Mint.BankMoney = Convert.ToInt32((ts.Hours * (double)r.RoomPrice));
                        if (order.Beveragecost != null)
                        { Mint.BankMoney += (int)order.Beveragecost; }
                        Bint.Add(Mint);
                    }
                }
                gdvOrder.DataSource = databind();
                gdvOrder.DataBind();
            }
コード例 #4
0
ファイル: orderMan.aspx.cs プロジェクト: hackerlank/robinerp
        protected void gdvOrder_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            ////得到单位编号
            //string rowUpdate = this.gdvOrder.DataKeys[].Values[0].ToString();
            ////转换为整数
            //int ID = Convert.ToInt32(rowUpdate);
            //QPS.BLL.Orderform Border = new QPS.BLL.Orderform();
            //QPS.Model.Orderform Morder = new QPS.Model.Orderform();
            //Morder.Id = ID;
            //Morder.Beveragecost = (decimal)this.gdvOrder.DataKeys[e.RowIndex].Values[3];
            //Border.Update(Morder);
            //gdvOrder.DataSource = databind();
            //gdvOrder.DataBind();
            string strArgument = e.CommandArgument.ToString();

            if (e.CommandName == "IsValidate")
            {
                string[] Argument = strArgument.Split('|');
                string   id       = Argument[0].ToString();

                string type = Argument[1].ToString();
                int    ok;
                if (type == "0")
                {
                    ok = 1;
                }
                else
                {
                    ok = 0;
                }

                QPS.NEW.BLL.Orderform   Border = new QPS.NEW.BLL.Orderform();
                QPS.NEW.Model.Orderform order  = Border.GetModel(Convert.ToInt32(id));
                Border.UpdateType(id, type);
                //订单有效 则加上积分  否则 如果存在积分 则删除
                QPS.NEW.BLL.Integral   Bint = new QPS.NEW.BLL.Integral();
                QPS.NEW.Model.Integral Mint = new QPS.NEW.Model.Integral();
                if (Bint.GetList("OrderId='" + id + "'").Tables[0].Rows.Count > 0)     //删除已有积分
                {
                    Bint.Delete(Convert.ToInt32(Bint.GetList("OrderId='" + id + "'").Tables[0].Rows[0]["Id"]));
                }
                if (ok == 1)//有效
                {
                    QPS.NEW.BLL.Room   Broom = new QPS.NEW.BLL.Room();
                    QPS.NEW.Model.Room r     = Broom.GetModel(order.Roomid);
                    //Mint.OrderId = Convert.ToInt32(id);
                    //Mint.RoomId = order.Roomid;
                    Mint.UserID = order.Userid;
                    //Mint.CreateTime = order.StartTime;
                    TimeSpan ts = (TimeSpan)(order.endTime - order.StartTime);
                    Mint.BankMoney = Convert.ToInt32((ts.Hours * (double)r.RoomPrice));
                    if (order.Beveragecost != null)
                    {
                        Mint.BankMoney += (int)order.Beveragecost;
                    }
                    Bint.Add(Mint);
                }
            }
            gdvOrder.DataSource = databind();
            gdvOrder.DataBind();
        }