void ShowDocRecord(DocRecord docRecord) { Id = docRecord.Id; RefId = docRecord.RefId; DocDate = docRecord.DocDate; Subject = docRecord.Subject; Destination = docRecord.Destination; DocPath = docRecord.DocPath; SelectedDocStatus = DocStatuses.SingleOrDefault(x => x.Key == docRecord.DocStatus); }
protected override void ClearView() { if (_controllerStates == ControllerStates.Edited) { string msg = Properties.Resources.SavePrompetMsg; if (!Helper.UserConfirmed(msg)) { return; } } Id = ""; RefId = ""; DocDate = ""; Subject = ""; Destination = DocDestinations.Where(x => x.Id == -1).FirstOrDefault(); DocPath = ""; SelectedDocStatus = DocStatuses.SingleOrDefault(x => x.Key == DocRecordStatus.Open); ControlState(ControllerStates.Blank); }