Ejemplo n.º 1
0
        private void Notify(int id, View view, string document)
        {
            ChildrenField childrenField = (ChildrenField)view.Fields["FK_ApprovalProcessUser_ApprovalProcess_Children"];

            DataView approvalProcessUserDataView = childrenField.GetDataView(id.ToString());

            foreach (System.Data.DataRowView row in approvalProcessUserDataView)
            {
                int    userId = (int)row.Row["UserId"];
                int    approvalProcessUserId = (int)row.Row["Id"];
                string subject = GetSubject((View)childrenField.ChildrenView, approvalProcessUserId);
                string message = GetMessage((View)childrenField.ChildrenView, approvalProcessUserId);

                string to   = string.Empty;
                string name = string.Empty;
                GetEmailInfo(userId.ToString(), out to, out name);
                SendEmail(GetDefaultFrom(), to, string.Empty, message, subject, new string[1] {
                    document
                });
            }
        }
Ejemplo n.º 2
0
 protected virtual DataView GetDataView(ChildrenField childrenField, DataRow dataRow)
 {
     return(childrenField.GetDataView(dataRow));
 }