示例#1
0
    public string EditFloor(TB_Floor tb_Floor)
    {
        FloorBLL mFloorBLL = new FloorBLL();

        mFloorBLL.ErrMessage = string.Empty;
        mFloorBLL.Edit(tb_Floor);
        return(mFloorBLL.ErrMessage);
    }
示例#2
0
        /// <summary>
        /// 初始化页面数据
        /// </summary>
        private void InitPage()
        {
            string   strID = Request.QueryString["id"];
            int      intID;
            TB_Floor mTB_Floor = null;
            FloorBLL mFloorBLL = new FloorBLL();

            if (Int32.TryParse(strID, out intID))
            {
                mTB_Floor                      = mFloorBLL.Get(intID);
                this.txtFloor.Text             = mTB_Floor.Name;
                this.ddlDormArea.SelectedValue = mTB_Floor.DormAreaID.ToString();
                this.BindDDLBuilding(mTB_Floor.DormAreaID);
                this.ddlBuilding.SelectedValue = mTB_Floor.BuildingID.ToString();
                this.BindDDLUnit(mTB_Floor.BuildingID);
                this.ddlUnit.SelectedValue = mTB_Floor.UnitID.ToString();
            }
        }
示例#3
0
        /// <summary>
        /// GridView绑定
        /// </summary>
        /// <param name="intCurrentIndex"></param>
        private void Bind(int intCurrentIndex)
        {
            TB_Floor mTB_Floor = new TB_Floor();
            FloorBLL mFloorBLL = new FloorBLL();
            Pager    pager     = new Pager();

            pager.CurrentPageIndex = intCurrentIndex;
            pager.srcOrder         = "  ID desc";

            mTB_Floor.SiteID     = (base.UserInfo == null ? base.SystemAdminInfo.SiteID : base.UserInfo.SiteID);
            mTB_Floor.Name       = this.txtFloorName.Text.Trim();
            mTB_Floor.DormAreaID = Convert.ToInt32(this.ddlDormArea.SelectedValue);
            mTB_Floor.BuildingID = Convert.ToInt32(Request.Form[this.ddlBuildingName.UniqueID.ToString()]);
            mTB_Floor.UnitID     = Convert.ToInt32(Request.Form[this.ddlUnit.UniqueID.ToString()]);
            GridView1.DataSource = mFloorBLL.GetTable(mTB_Floor, ref pager);
            GridView1.DataBind();

            this.Pager1.ItemCount    = pager.TotalRecord;
            this.Pager1.PageCount    = pager.TotalPage;
            this.Pager1.CurrentIndex = pager.CurrentPageIndex;
            this.Pager1.PageSize     = pager.PageSize;
        }
示例#4
0
 /// <summary>
 /// 绑定楼层
 /// </summary>
 /// <param name="intBuildingID"></param>
 private void BindDDLFloor(int intUnitID)
 {
     if (intUnitID > 0)
     {
         FloorBLL mFloorBLL = new FloorBLL();
         this.ddlFloor.DataValueField = TB_Floor.col_ID;
         this.ddlFloor.DataTextField  = TB_Floor.col_Name;
         this.ddlFloor.DataSource     = mFloorBLL.GetFloorByUnitID(Convert.ToInt32(this.ddlUnit.SelectedValue));
         this.ddlFloor.DataBind();
         this.ddlFloor.Items.Insert(0, new ListItem()
         {
             Value = "0", Text = "--请选择--"
         });
     }
     else
     {
         this.ddlFloor.Items.Clear();
         this.ddlFloor.Items.Insert(0, new ListItem()
         {
             Value = "0", Text = "--请选择--"
         });
     }
 }