예제 #1
0
        public static void UpdateTemplate(int templateId, string templateHtml)
        {
            using (var db = new PricingPortalEntities())
            {
                ContractTemplate template = db.ContractTemplates.First(c => c.ContractTemplateId == templateId);

                template.HtmlContent = templateHtml;

                db.SaveChanges();
            }
        }
예제 #2
0
        public static void CreateTemplatesType(string typeCode, string typeDesc)
        {
            using (var db = new PricingPortalEntities())
            {
                ContractTemplateType newType = new ContractTemplateType()
                {
                    TemplateTypeCode = typeCode,
                    Description      = typeDesc
                };

                db.ContractTemplateTypes.Add(newType);
                db.SaveChanges();
            }
        }
        public static void CreateTemplatesType(string typeCode, string typeDesc)
        {
            using (var db = new PricingPortalEntities())
            {
                ContractTemplateType newType = new ContractTemplateType()
                {
                    TemplateTypeCode = typeCode,
                    Description = typeDesc
                };

                db.ContractTemplateTypes.Add(newType);
                db.SaveChanges();
            }
        }
예제 #4
0
        public static void CreateTemplate(string templateName, string templateHtml, int templateTypeId)
        {
            using (var db = new PricingPortalEntities())
            {
                ContractTemplate newTemplate = new ContractTemplate()
                {
                    CreateDate             = DateTime.Now,
                    CreateUserId           = 16,
                    EffectiveDate          = DateTime.MinValue,
                    EndDate                = DateTime.MaxValue,
                    TemplateName           = templateName,
                    HtmlContent            = templateHtml,
                    ContractTemplateTypeId = templateTypeId
                };

                db.ContractTemplates.Add(newTemplate);
                db.SaveChanges();
            }
        }
        public static void CreateTemplate(string templateName, string templateHtml, int templateTypeId)
        {
            using (var db = new PricingPortalEntities())
            {
                ContractTemplate newTemplate = new ContractTemplate()
                {
                    CreateDate = DateTime.Now,
                    CreateUserId = 16,
                    EffectiveDate = DateTime.MinValue,
                    EndDate = DateTime.MaxValue,
                    TemplateName = templateName,
                    HtmlContent = templateHtml,
                    ContractTemplateTypeId = templateTypeId
                };

                db.ContractTemplates.Add(newTemplate);
                db.SaveChanges();
            }
        }
        public static void UpdateTemplate(int templateId, string templateHtml)
        {
            using (var db = new PricingPortalEntities())
            {
                ContractTemplate template = db.ContractTemplates.First(c => c.ContractTemplateId == templateId);

                template.HtmlContent = templateHtml;

                db.SaveChanges();
            }
        }