예제 #1
0
        protected void InitDetailInfo(string id)
        {
            int logID = Convert.ToInt32(id);

            Library.SOA.DataObjects.UserOperationLog log = UserOperationLogAdapter.Instance.Load(logID);

            if (log.Equals(null))
            {
                subject.Text                                =
                    appName.Text                            =
                        actName.Text                        =
                            actionName.Text                 =
                                opUserID.Text               =
                                    topDeptID.Text          =
                                        description.Text    =
                                            opDateTime.Text = Translator.Translate(Define.DefaultCulture, "无");
            }

            this.appName.Text    = HttpUtility.HtmlEncode((log.ApplicationName == string.Empty) ? Translator.Translate(Define.DefaultCulture, "无") : log.ApplicationName);
            this.actionName.Text = HttpUtility.HtmlEncode((log.OperationName == string.Empty) ? ""
                                : Translator.Translate(Define.DefaultCulture, log.OperationName));

            this.actName.Text = HttpUtility.HtmlEncode((log.ActivityName == string.Empty) ? Translator.Translate(Define.DefaultCulture, "无") : Translator.Translate(Define.DefaultCulture, log.ActivityName));

            this.opDateTime.Text  = HttpUtility.HtmlEncode((log.OperationDateTime.ToString() == string.Empty) ? Translator.Translate(Define.DefaultCulture, "无") : string.Format("{0:yyyy-MM-dd HH:mm:ss}", log.OperationDateTime));
            this.opUserID.Text    = HttpUtility.HtmlEncode((log.Operator.Name.ToString() == string.Empty) ? Translator.Translate(Define.DefaultCulture, "无") : Translator.Translate(Define.DefaultCulture, log.Operator.Name.ToString()));
            this.topDeptID.Text   = HttpUtility.HtmlEncode((log.TopDepartment.Name.ToString() == string.Empty) ? Translator.Translate(Define.DefaultCulture, "无") : log.TopDepartment.Name.ToString());
            this.subject.Text     = HttpUtility.HtmlEncode((log.Subject == string.Empty) ? "无" : log.Subject);
            this.description.Text =
                HttpUtility.HtmlEncode((log.OperationDescription.ToString() == string.Empty) ?
                                       Translator.Translate(Define.DefaultCulture, "无") : TranslateLogDescription(log.OperationDescription.ToString()));

            /*
             * UserOperationTasksLogCollection collection = UserOperationTasksLogAdapter.Instance.Load(builder => builder.AppendItem("LOG_ID", logID));
             *
             * StringBuilder strB = new StringBuilder();
             * bool flag = true;
             * foreach (var item in collection)
             * {
             *      if (flag)
             *      {
             *              flag = false;
             *              strB.Append(item.SendToUserName);
             *      }
             *      else
             *              strB.AppendFormat(",{0}", item.SendToUserName);
             *      //this.LB_OperationTasksLog.Items.Add(item.SendToUserName);
             * }
             * this.operationTasksLog.Text = flag == true ? Translator.Translate(Define.DefaultCulture, "无") : TranslateLogDescription(strB.ToString()); */
            //subject.Text = log.Subject.Equals("") ? "无" : log.Subject;
            //appName.Text = log.ApplicationName.Equals("") ? "无" : log.ApplicationName;
            //actName.Text = log.ActivityName.Equals("") ? "无" : log.ActivityName;
            //actionName.Text = log.ProgramName.Equals("") ? "无" : log.ProgramName;
            //opUserID.Text = log.RealUser.ID.Equals("") ? "无" : log.RealUser.DisplayName;
            //topDeptID.Text = log.TopDepartment.ID.Equals("") ? "无" : log.TopDepartment.Name;
            //description.Text = log.OperationDescription.Equals("") ? "无" : log.OperationDescription;
            //opDateTime.Text = log.OperationDateTime.ToString().Equals("") ? "无" : log.OperationDateTime.ToString();
        }
예제 #2
0
		public static Library.SOA.DataObjects.UserOperationLog CreateDissassignLog(WfDelegation data)
		{
			var log = new Library.SOA.DataObjects.UserOperationLog()
			{
				Operator = DeluxeIdentity.CurrentUser,
				RealUser = DeluxeIdentity.CurrentRealUser,
				OperationDateTime = DateTime.Now,
				OperationName = "解除委托",
				Subject = "解除委托",
				OperationType = Library.SOA.DataObjects.OperationType.Delete,
				ResourceID = LogUtil.ResourceID,
				OperationDescription = string.Format("解除指派委托代理:{0}被撤销与{1}委托", data.DestinationUserName, data.SourceUserName, data.StartTime, data.EndTime),
			};
			return log;
		}
예제 #3
0
파일: LogUtil.cs 프로젝트: wooln/AK47Source
        public static Library.SOA.DataObjects.UserOperationLog CreateDissassignLog(WfDelegation data)
        {
            var log = new Library.SOA.DataObjects.UserOperationLog()
            {
                Operator             = DeluxeIdentity.CurrentUser,
                RealUser             = DeluxeIdentity.CurrentRealUser,
                OperationDateTime    = DateTime.Now,
                OperationName        = "解除委托",
                Subject              = "解除委托",
                OperationType        = Library.SOA.DataObjects.OperationType.Delete,
                ResourceID           = LogUtil.ResourceID,
                OperationDescription = string.Format("解除指派委托代理:{0}被撤销与{1}委托", data.DestinationUserName, data.SourceUserName, data.StartTime, data.EndTime),
            };

            return(log);
        }
예제 #4
0
파일: LogUtil.cs 프로젝트: wooln/AK47Source
 public static int AppendLogToDb(Library.SOA.DataObjects.UserOperationLog log)
 {
     return(UserOperationLogAdapter.Instance.InsertData(log));
 }