コード例 #1
0
 // shows the form with default values for comboboxes and pickers
 // links:
 //  docLink: http://sql2x.org/documentationLink/e04d0806-55ef-41cc-8669-acf0ddd850c7
 public void ShowAsAdd()
 {
     try {
         _contract  = new CrudeDefaultUserActivityContract();
         _isNew     = true;
         this.Text += " - Not Savable (DefaultUser Missing)";
         Show();
     } catch (Exception ex) {
         if (ex == null)
         {
         }
         else
         {
             System.Diagnostics.Debugger.Break();
         }
     }
 }
コード例 #2
0
        // shows the form with default values for comboboxes and pickers
        // links:
        //  docLink: http://sql2x.org/documentationLink/599dcb45-f71b-4672-bb18-46975a4fe9b3
        public void ShowAsAddByRules(System.Guid defaultUserId)
        {
            try {
                _contract = new CrudeDefaultUserActivityContract();
                _isNew    = true;
                _contract.DefaultUserId = defaultUserId;

                Show();
            } catch (Exception ex) {
                if (ex == null)
                {
                }
                else
                {
                    System.Diagnostics.Debugger.Break();
                }
            }
        }
コード例 #3
0
        public static void ActionLog(
            //            HttpRequestBase request,
            string message,
            dynamic viewBag
            )
        {
            try {
                var contract = new CrudeDefaultUserActivityContract();

                contract.DefaultUserActivityId      = Guid.NewGuid();
                contract.DefaultUserActivityTypeRcd = DefaultUserActivityTypeRef.WebPageOpened;

                contract.UserActivityNote = string.IsNullOrEmpty(message) ? null : message;

                contract.DefaultUserId = UserId(viewBag);
                contract.DateTime      = DateTime.UtcNow;

                var activity = new CrudeDefaultUserActivityServiceClient();
                activity.Insert(contract);
                activity.Close();
            } catch { };
        }
コード例 #4
0
        public static void ActionLog(
            //            HttpRequestBase request,
            string message,
            dynamic viewBag
            )
        {
            try {
                CrudeDefaultUserActivityContract contract = new CrudeDefaultUserActivityContract {
                    DefaultUserActivityId      = Guid.NewGuid(),
                    DefaultUserActivityTypeRcd = DefaultUserActivityTypeRef.WebPageOpened,

                    UserActivityNote = string.IsNullOrEmpty(message) ? null : message,

                    DefaultUserId = new Guid("{FFFFFFFF-5555-5555-5555-FFFFFFFFFFFF}"),
                    DateTime      = DateTime.UtcNow
                };

                CrudeDefaultUserActivityServiceClient activity = new CrudeDefaultUserActivityServiceClient();
                activity.Insert(contract);
                activity.Close();
            } catch { };
        }
コード例 #5
0
ファイル: mvcHelper.cs プロジェクト: jacov/nor-port
        public static void ActionLog(
            HttpRequestBase request,
            string message,
            dynamic viewBag
            )
        {
            try {
                var contract = new CrudeDefaultUserActivityContract();

                contract.DefaultUserActivityId      = Guid.NewGuid();
                contract.DefaultUserActivityTypeRcd = DefaultUserActivityTypeRef.WebPageOpened;

                // get referrer
                try {
                    contract.Referrer = request.UrlReferrer != null &&
                                        !string.IsNullOrEmpty(request.UrlReferrer.OriginalString)
                                        ? request.UrlReferrer.OriginalString
                                        : "no referrer";
                } catch { }

                contract.UserActivityNote = string.IsNullOrEmpty(message) ? null : message;

                try {
                    contract.OriginatingAddress = request.ServerVariables != null &&
                                                  !string.IsNullOrEmpty(request.ServerVariables["REMOTE_ADDR"])
                                                  ? request.ServerVariables["REMOTE_ADDR"]
                                                  : "no originating address";
                } catch { };

                //contract.DefaultUserId = UserId(User.Identity, viewBag);
                contract.DefaultUserId = new Guid("{FFFFFFFF-5555-5555-5555-FFFFFFFFFFFF}");
                contract.DateTime      = DateTime.UtcNow;

                var activity = new CrudeDefaultUserActivityServiceClient();
                //activity.Insert(contract);
                activity.Close();
            } catch { };
        }
コード例 #6
0
        public static void ActionLog(
            //            HttpRequestBase request,
            string message
            )
        {
            try {
                var contract = new CrudeDefaultUserActivityContract();

                contract.DefaultUserActivityId      = Guid.NewGuid();
                contract.DefaultUserActivityTypeRcd = DefaultUserActivityTypeRef.WebPageOpened;
                contract.UserActivityNote           = message;

                try {
                    //                    contract.OriginatingAddress = request.ServerVariables["REMOTE_ADDR"];
                } catch { };

                contract.DefaultUserId = UserId(string.Empty);
                contract.DateTime      = DateTime.UtcNow;

                var activity = new CrudeDefaultUserActivityServiceClient();
                activity.Insert(contract);
                activity.Close();
            } catch { };
        }