Exemplo n.º 1
0
        public void RedirectDocument(string actionId, int documentId, Guid userId, string userName, string userFullname, bool workOnPaper,
                                     string note, int organizationalUnitId, int employeeId, string ouName, string empName)
        {
            Database db = DatabaseFactory.CreateDatabase();

            if (actionId == "450423F0-4819-4BE3-8BF4-E42C17815B59")
            {
                db.ExecuteNonQuery("Akcje.przekazanieDokumentu", documentId, userId, organizationalUnitId, employeeId);
                List <string> p = new List <string>();
                p.Add(ouName);
                p.Add(empName);
                ActionContext ctx = new ActionContext(new Guid("450423F0-4819-4BE3-8BF4-E42C17815B59"), userId, userName, userFullname, p);
                ActionLogger  al  = new ActionLogger(ctx);
                al.AppliesToDocuments.Add(documentId);
                al.ActionData.Add("notatka", note);
                al.ActionData.Add("wydzial", ouName);
                al.ActionData.Add("pracownik", empName);
                al.Execute();
            }
            if (actionId == "10672122-E570-4A04-9D5D-A6667C27FE3D")
            {
                db.ExecuteNonQuery("Akcje.dekretacjaDokumentu", documentId, userId, organizationalUnitId, employeeId);
                List <string> p = new List <string>();
                p.Add(ouName);
                p.Add(empName);
                ActionContext ctx = new ActionContext(new Guid("10672122-E570-4A04-9D5D-A6667C27FE3D"), userId, userName, userFullname, p);
                ActionLogger  al  = new ActionLogger(ctx);
                al.AppliesToDocuments.Add(documentId);
                al.ActionData.Add("wersjaPapierowa", workOnPaper ? "tak" : "nie");
                al.ActionData.Add("notatka", note);
                al.ActionData.Add("wydzial", ouName);
                al.ActionData.Add("pracownik", empName);
                al.Execute();
            }
        }
Exemplo n.º 2
0
        public void RedirectCase(int caseId, Guid userId, string userName, string userFullname, string note,
                                 int organizationalUnitId, int employeeId, string ouName, string empName)
        {
            Database      db         = DatabaseFactory.CreateDatabase();
            List <string> parameters = new List <string>();

            parameters.Add(caseId.ToString());
            parameters.Add(ouName);
            parameters.Add(empName);
            if (db.ExecuteNonQuery("[Akcje].[przekazanieSprawy]", caseId, organizationalUnitId, employeeId) > 0)
            {
                ActionLogger al = new ActionLogger(new ActionContext(new Guid("386D76E7-FAA0-4264-A722-BFB60ACCBD46"), userId, userName, userFullname, parameters));
                al.AppliesToCases.Add(caseId);
                al.ActionData.Add("notatka", note);
                al.ActionData.Add("wydzial", ouName);
                al.ActionData.Add("pracownik", empName);
                al.Execute();
            }
        }