public int Create(WareDocument Document, StatesOfDocument State) { int result = 1; WareDocumentState DocumentState = new WareDocumentState(); Document.WareDocumentStates.Add(DocumentState); State.WareDocumentStates.Add(DocumentState); return(result); }
internal static Color GetDocumentColor(this DataRow row) { StatesOfDocument rowDocState = (StatesOfDocument)(int)row["State"]; switch (rowDocState) { case StatesOfDocument.Processing: return(StatesColors.Processing); case StatesOfDocument.Performed: return(StatesColors.Performed); case StatesOfDocument.Canceled: return(StatesColors.Canceled); case StatesOfDocument.Completed: return(StatesColors.Completed); case StatesOfDocument.Planned: return(StatesColors.Planed); } return(Color.White); }