コード例 #1
0
        private void sb_AddWH_Click(object sender, EventArgs e)
        {
            WHHouse house = new WHHouse();

            operHouseView.operateName = "添加";
            operHouseView.house       = house;
            operHouseView.ShowDialog();
        }
コード例 #2
0
        public bool ModifyHouseModel(WHHouse house)
        {
            WH_WareHouseModel houseModel = bllWareHouse.GetModel(house.WareHouse_ID);

            if (houseModel == null)
            {
                return(false);
            }
            houseModel.WareHouse_Code   = house.WareHouse_Code;
            houseModel.WareHouse_Flag   = house.WareHouse_Flag;
            houseModel.WareHouse_Name   = house.WareHouse_Name;
            houseModel.WareHouse_Remark = house.WareHouse_Remark;
            houseModel.WareHouse_Type   = house.WareHouse_Type;

            return(bllWareHouse.Update(houseModel));
        }
コード例 #3
0
        public bool AddHuouseModel(WHHouse house)
        {
            WH_WareHouseModel houseModel = bllWareHouse.GetModel(house.WareHouse_ID);

            if (houseModel != null)
            {
                this.View.ShowMessage("信息提示", "此库房编号已存在!");
                return(false);
            }
            houseModel = new WH_WareHouseModel();
            houseModel.WareHouse_ID     = house.WareHouse_ID;
            houseModel.WareHouse_Code   = house.WareHouse_Code;
            houseModel.WareHouse_Flag   = house.WareHouse_Flag;
            houseModel.WareHouse_Name   = house.WareHouse_Name;
            houseModel.WareHouse_Remark = house.WareHouse_Remark;
            houseModel.WareHouse_Type   = house.WareHouse_Type;
            return(bllWareHouse.Add(houseModel));
        }
コード例 #4
0
        private void sb_ModifyWH_Click(object sender, EventArgs e)
        {
            if (this.gv_WHList.GetSelectedRows() == null || this.gv_WHList.GetSelectedRows().Count() == 0)
            {
                this.ShowMessage("信息提示", "请选择要修改的库房!");
                return;
            }
            int     currRow = this.gv_WHList.GetSelectedRows()[0];
            WHHouse house   = new WHHouse();

            house.WareHouse_ID     = this.gv_WHList.GetRowCellValue(currRow, "库房编号").ToString();
            house.WareHouse_Code   = this.gv_WHList.GetRowCellValue(currRow, "库房编码").ToString();
            house.WareHouse_Name   = this.gv_WHList.GetRowCellValue(currRow, "库房名称").ToString();
            house.WareHouse_Type   = this.gv_WHList.GetRowCellValue(currRow, "库房类型").ToString();
            house.WareHouse_Flag   = this.gv_WHList.GetRowCellValue(currRow, "库房启用").ToString();
            house.WareHouse_Remark = this.gv_WHList.GetRowCellValue(currRow, "库房备注").ToString();

            operHouseView.operateName = "修改";
            operHouseView.house       = house;
            operHouseView.ShowDialog();
        }