public MainWindow() { //DetailInvoiceFileModel model = new DetailInvoiceFileModel(); //Close(); //#if ASDF ContractNotesViewModel VM = new ContractNotesViewModel(1, "Frank"); DisplayNotes mainWindow = new DisplayNotes(VM); mainWindow.ShowDialog(); //#endif }
public JsonResult SaveContractNotes(ContractNotesViewModel info) { ContractNote note = AutoMapper.Mapper.Map <ContractNotesViewModel, ContractNote>(info); //Get the Name of User logged in note.UserName = GetCurrentUserName(); ContractNote responseNote = PostApiResponse <ContractNote>("ContractNote", "AddEditContractNote", note); if (responseNote.ContractNoteId > 0) { return (Json( new { sucess = true, Id = responseNote.ContractNoteId, userName = note.UserName, insertedTime = Convert.ToDateTime(responseNote.InsertDate).ToString(Constants.DateTimeFormatWithSecond) })); } return(Json(new { sucess = false })); }