/// <summary> /// 删除 /// </summary> public override void EntityDelete() { MachineManageRule rule = new MachineManageRule(); MachineManage entity = EntityGet(); rule.RDelete(entity); }
/// <summary> /// 绑定Grid /// </summary> public override void BindGrid() { MachineManageRule rule = new MachineManageRule(); gridView1.GridControl.DataSource = rule.RShow(HTDataConditionStr, ProcessGrid.GetQueryField(gridView1)); gridView1.GridControl.Show(); }
/// <summary> /// 新增 /// </summary> public override int EntityAdd() { MachineManageRule rule = new MachineManageRule(); MachineManage entity = EntityGet(); rule.RAdd(entity); return(entity.ID); }
/// <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); }