Ejemplo n.º 1
0
        protected void gdvPersonnalOrder_RowDeleting(object sender, GridViewDeleteEventArgs e)
        {
            //得到单位编号
            string rowToDelete = this.gdvRoom.DataKeys[e.RowIndex].Values[0].ToString();
            //转换为整数
            int ID = Convert.ToInt32(rowToDelete);

            QPS.NEW.BLL.Orderform Border = new QPS.NEW.BLL.Orderform();
            QPS.NEW.BLL.Room      Broom  = new QPS.NEW.BLL.Room();
            if (Broom.GetModel(ID).RoomState == 1)//说明此房间被预定需要从订单中删除
            {
                DataSet dsOrder = Border.GetList("Roomid='" + ID + "'");
                int     Oid     = Convert.ToInt32(dsOrder.Tables[0].Rows[0]["Id"]);
                Border.Delete(Oid);
            }
            Broom.Delete(ID);
            databind(gdvRoom);
        }
Ejemplo n.º 2
0
        protected void gdvPersonnalOrder_RowDeleting(object sender, GridViewDeleteEventArgs e)
        {
            //得到单位编号
            string rowToDelete = gdvPersonnalOrder.DataKeys[e.RowIndex].Values[0].ToString();
            //转换为整数
            int ID = Convert.ToInt32(rowToDelete);

            QPS.NEW.BLL.Orderform Border = new QPS.NEW.BLL.Orderform();
            QPS.NEW.BLL.Room      Broom  = new QPS.NEW.BLL.Room();

            DataSet dsorder = Border.GetList("Roomid ='" + ID + "'");
            int     Oid     = Convert.ToInt32(dsorder.Tables[0].Rows[0]["Id"]);

            Border.Delete(Oid);
            QPS.NEW.Model.Room r = Broom.GetModel(ID);
            r.RoomState = 0;
            Broom.Update(r);
            databind(gdvPersonnalOrder);
        }
Ejemplo n.º 3
0
        // 生成事件时激发
        protected void dgExamProj_ItemCommand(object source, DataGridCommandEventArgs e)
        {
            string command = e.CommandName.ToString();
            //两个参数  1.当前订单ID,2.当前订单状态
            string strArgument = e.CommandArgument.ToString();

            QPS.NEW.BLL.Orderform of = new QPS.NEW.BLL.Orderform();

            switch (command)
            {
            case "changStart":
                string[] Argument = strArgument.Split('|');
                string   id       = Argument[0].ToString();
                string   type     = Argument[1].ToString();
                of.UpdateType(id, type);
                Bind();
                break;

            case "delete":

                of.Delete(Convert.ToInt32(strArgument));
                Bind();
                break;

            case "DeleteIs":
                string[] Arguments = strArgument.Split('|');
                string   ids       = Arguments[0].ToString();
                string   examine   = Arguments[1].ToString();
                of.UpdateIsDelete(ids, examine);
                Bind();
                break;

            default:
                break;
            }
        }
Ejemplo n.º 4
0
        // 生成事件时激发
        protected void dgExamProj_ItemCommand(object source, DataGridCommandEventArgs e)
        {
            string command = e.CommandName.ToString();
            //两个参数  1.当前订单ID,2.当前订单状态
            string strArgument = e.CommandArgument.ToString();
            QPS.NEW.BLL.Orderform of = new QPS.NEW.BLL.Orderform();

            switch (command)
            { 
                case "changStart":
                        string[] Argument = strArgument.Split('|');
                        string id = Argument[0].ToString();
                        string type = Argument[1].ToString();
                        of.UpdateType(id,type);
                        Bind();
                    break;
                case "delete":

                    of.Delete(Convert.ToInt32(strArgument));
                        Bind();
                    break;

                case "DeleteIs":
                    string[] Arguments = strArgument.Split('|');
                    string ids = Arguments[0].ToString();
                    string examine = Arguments[1].ToString();
                    of.UpdateIsDelete(ids, examine);
                    Bind();
                    break;
                default:
                    break;
            }


        }
Ejemplo n.º 5
0
 protected void gdvPersonnalOrder_RowDeleting(object sender, GridViewDeleteEventArgs e)
 {
     //得到单位编号
     string rowToDelete = this.gdvRoom.DataKeys[e.RowIndex].Values[0].ToString();
     //转换为整数
     int ID = Convert.ToInt32(rowToDelete);
     QPS.NEW.BLL.Orderform Border = new QPS.NEW.BLL.Orderform();
     QPS.NEW.BLL.Room Broom = new QPS.NEW.BLL.Room();
     if (Broom.GetModel(ID).RoomState == 1)//说明此房间被预定需要从订单中删除
     {
         DataSet dsOrder = Border.GetList("Roomid='" + ID + "'");
         int Oid = Convert.ToInt32(dsOrder.Tables[0].Rows[0]["Id"]);
         Border.Delete(Oid);
     }
     Broom.Delete(ID);
     databind(gdvRoom);
 }
Ejemplo n.º 6
0
       protected void gdvPersonnalOrder_RowDeleting(object sender, GridViewDeleteEventArgs e)
       {
          //得到单位编号
           string rowToDelete = gdvPersonnalOrder.DataKeys[e.RowIndex].Values[0].ToString();
         //转换为整数
          int ID=Convert.ToInt32(rowToDelete);
          QPS.NEW.BLL.Orderform Border = new QPS.NEW.BLL.Orderform();
          QPS.NEW.BLL.Room Broom = new QPS.NEW.BLL.Room();
 
          DataSet dsorder= Border.GetList("Roomid ='" + ID + "'");
          int Oid = Convert.ToInt32(dsorder.Tables[0].Rows[0]["Id"]);
          Border.Delete(Oid);
          QPS.NEW.Model.Room r = Broom.GetModel(ID);
          r.RoomState = 0;
          Broom.Update(r);
          databind(gdvPersonnalOrder);
       }