public bool UpdateSystemMaintenanceRecord(SystemMaintenanceModelSend systemMaintenanceModelSend) { HeadModelGet <List <SystemMaintenanceModelGet> > headModelGet = BwHttpApiAccess <HeadModelGet <List <SystemMaintenanceModelGet> > > .PostMsg( ApiAddress.UpdateSystemMaintenanceRecord, systemMaintenanceModelSend); return(headModelGet.Code == 0); }
public FormSystemMaintenance() { InitializeComponent(); _systemMaintenanceModelSend = new SystemMaintenanceModelSend(); _dataPagingModelSend = new DataPagingModelSend(); _systemMaintenanceModelSend.DataPagingModel = _dataPagingModelSend; }
private void btnCheck_Click(object sender, EventArgs e) { if (dtS.EditValue == null) { XtraMessageBox.Show("开始维护时间不能为空"); return; } if (dtE.EditValue == null) { XtraMessageBox.Show("结束维护时间不能为空"); return; } if (Convert.ToDateTime(dtS.EditValue) >= Convert.ToDateTime(dtE.EditValue)) { XtraMessageBox.Show("开始维护时间不能大于等于结束维护时间"); return; } SystemMaintenanceModelSend systemMaintenanceModelSend = new SystemMaintenanceModelSend(); systemMaintenanceModelSend.EmployeeId = LoginedUserInfo.Id; systemMaintenanceModelSend.MaintenanceTimeBegin = Convert.ToDateTime(dtS.EditValue).ToString("yyyy-MM-dd HH:mm:ss"); systemMaintenanceModelSend.MaintenanceTimeEnd = Convert.ToDateTime(dtE.EditValue).ToString("yyyy-MM-dd HH:mm:ss"); bool result = _systemMaintenanceApi.InsertSystemMaintenanceRecord(systemMaintenanceModelSend); if (result) { this.DialogResult = DialogResult.OK; Close(); } }
public List <SystemMaintenanceModelGet> QuerySystemMaintenanceRecord(SystemMaintenanceModelSend systemMaintenanceModelSend, out DataPagingModelGet dataPagingModelGet) { HeadModelGet <List <SystemMaintenanceModelGet> > headModelGet = BwHttpApiAccess <HeadModelGet <List <SystemMaintenanceModelGet> > > .PostMsg( ApiAddress.QuerySystemMaintenanceRecord, systemMaintenanceModelSend); dataPagingModelGet = headModelGet.DataPagingResult ?? new DataPagingModelGet(); return(headModelGet.Code == 0 ? headModelGet.Data : null); }
private void btnDelete_Click(object sender, EventArgs e) { SystemMaintenanceModelGet systemMaintenanceModelGet = gvRecord.GetFocusedRow() as SystemMaintenanceModelGet; if (systemMaintenanceModelGet != null) { SystemMaintenanceModelSend systemMaintenanceModelSend = new SystemMaintenanceModelSend(); systemMaintenanceModelSend.Id = systemMaintenanceModelGet.Id; systemMaintenanceModelSend.EmployeeId = LoginedUserInfo.Id; bool result = _systemMaintenanceApi.UpdateSystemMaintenanceRecord(systemMaintenanceModelSend); if (!result) { XtraMessageBox.Show("操作失败"); return; } btnDelete.Enabled = false; systemMaintenanceModelGet.State = "1"; systemMaintenanceModelGet.UpdateTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); systemMaintenanceModelGet.UpdateEmployeeAccountId = LoginedUserInfo.AccountId; systemMaintenanceModelGet.UpdateEmployeeNickname = LoginedUserInfo.Name; gvRecord.RefreshData(); } }