public ManuscriptLoginDTO() { manuscriptLogin = new Entities.ManuscriptLogin(); manuscriptLoginDetails = new List <Entities.ManuscriptLoginDetails>(); }
public void AddManuscriptLogin(Entities.ManuscriptLogin manuscriptLogin) { context.ManuscriptLogin.Add(manuscriptLogin); }
public void UpdateManuscriptLogin(Entities.ManuscriptLogin manuscriptLogin) { context.Entry(manuscriptLogin).State = EntityState.Modified; }
public bool SaveManuscriptLoginVM(IDictionary <string, string> dataErrors, ManuscriptLoginVM manuscriptLoginVM, Entities.ManuscriptLogin manuscriptLogin) { ValidateManuscriptLogin(dataErrors, manuscriptLoginVM); if (dataErrors.Count == 0) { manuscriptLoginDTO = new ManuscriptLoginDTO(); //manuscriptLogin = new Entities.ManuscriptLogin(); //ManuscriptLogin entity data fill up if (manuscriptLoginVM.CrestId == null || manuscriptLoginVM.CrestId == 0) { manuscriptLogin.CrestId = Convert.ToInt32(manuscriptLoginVM.CrestId); //manuscriptLogin.ManuscriptFilePath = manuscriptLoginVM.ManuscriptFilePath; } manuscriptLogin.ArticleTitle = manuscriptLoginVM.ArticleTitle; manuscriptLogin.ArticleTypeId = manuscriptLoginVM.ArticleTypeID; manuscriptLogin.InitialSubmissionDate = manuscriptLoginVM.InitialSubmissionDate; manuscriptLogin.SpecialInstruction = manuscriptLoginVM.SpecialInstruction; manuscriptLogin.SectionId = manuscriptLoginVM.SectionID; manuscriptLogin.ReceivedDate = manuscriptLoginVM.ReceivedDate; manuscriptLogin.TaskID = manuscriptLoginVM.TaskID; manuscriptLogin.JournalId = (manuscriptLoginVM.JournalID == 0) ? manuscriptLogin.JournalId : manuscriptLoginVM.JournalID; manuscriptLogin.ServiceTypeStatusId = manuscriptLoginVM.ServiceTypeID; manuscriptLogin.MSID = manuscriptLoginVM.MSID; //assign manuscriptlogin enitity object to DTO manuscriptLoginDTO.manuscriptLogin = manuscriptLogin; manuscriptLoginDTO.AssociateName = manuscriptLoginVM.Associate; manuscriptLoginDTO.IsRevision = manuscriptLoginVM.IsRevision; if (_manuscriptLoginBL.SaveManuscriptLogin(manuscriptLoginDTO, dataErrors)) { return(true); } else { return(false); } } else { return(false); } }