private void SetMetaDataTitle(FactoryStrategy strategy, List<IApplication> Applications) { if (Applications.Count() > 1) Title = (strategy.isOnlySummary) ? "My Enbloc Assignments" : "My Council Assignments"; else { title = "Generic ID"; if (Applications.Count > 0) { var application = Applications[0]; switch (application.GetType().ToString()) { case "CMWModels.CMWRfa": var rfa = (CMWRfa)application; title = rfa.RFAPANumber; break; case "CMWModels.CMWGrant": var grant = (CMWGrant)application; title = grant.FullGrantNum; break; default: var fdappl = (FDApplication)application; title = fdappl.ProjectNumber; break; } } } }
public Factory(FactoryStrategy strategy) { Strategy = strategy; }
/// <summary> /// Writes a single PDF into a Memory Stream /// </summary> //public virtual void Write(IApplication application, Factory factory) //{ // root = factory.root; // content = factory.content; // writer = factory.writer; // helper = factory.helper; // under = factory.under; // document = factory.document; // Create(writer); // // Creates all the content and tags //} /// <summary> /// Writes complex PDF into a Memory Stream /// </summary> public virtual void Write(Factory factory) { root = factory.root; content = factory.content; writer = factory.writer; helper = factory.helper; under = factory.under; document = factory.document; Strategy = factory.Strategy; Create(writer); // Creates all the content and tags }