Пример #1
0
        /// <summary>
        /// 删除
        /// </summary>
        public override void EntityDelete()
        {
            MachineManageRule rule   = new MachineManageRule();
            MachineManage     entity = EntityGet();

            rule.RDelete(entity);
        }
Пример #2
0
        /// <summary>
        /// 绑定Grid
        /// </summary>
        public override void BindGrid()
        {
            MachineManageRule rule = new MachineManageRule();

            gridView1.GridControl.DataSource = rule.RShow(HTDataConditionStr, ProcessGrid.GetQueryField(gridView1));
            gridView1.GridControl.Show();
        }
Пример #3
0
        /// <summary>
        /// 新增
        /// </summary>
        public override int EntityAdd()
        {
            MachineManageRule rule   = new MachineManageRule();
            MachineManage     entity = EntityGet();

            rule.RAdd(entity);
            return(entity.ID);
        }
Пример #4
0
        /// <summary>
        /// 修改
        /// </summary>
        public override void EntityUpdate()
        {
            string    sql = "SELECT Machine FROM Data_Item WHERE Machine=" + SysString.ToDBString(HTDataID);
            DataTable dt  = SysUtils.Fill(sql);

            if (dt.Rows.Count != 0)
            {
                this.ShowMessage("此机型已经在坯布管理中应用,不能修改");
                return;
            }
            MachineManageRule rule   = new MachineManageRule();
            MachineManage     entity = EntityGet();

            rule.RUpdate(entity);
        }