private void CreateApprovalWorkflow(SPList list, string workflowTemplateName, string workflowName, string fileSettings)
        {
            string association = string.Empty;

            if (!string.IsNullOrEmpty(fileSettings))
            {
                Assembly assembly = Assembly.GetExecutingAssembly();
                string xml = assembly.GetResourceTextFile(fileSettings);

                association = SerializationHelper.SerializeToXml(SerializationHelper.DeserializeFromXml<ApprovalWFAssociationData>(xml));
            }

            list.AssociateWorkflow(workflowTemplateName, workflowName, association, "Duyệt đề nghị");
        }
Example #2
0
 public static void AssociateWorkflow(this SPList list, string workflowTemplateName, string workflowAssocName, string association)
 {
     list.AssociateWorkflow(workflowTemplateName, workflowAssocName, association, string.Empty);
 }