Exemple #1
0
        public ActionResult CopyDay(DateTime copy_date, DateTime plan_date)
        {
            try
            {
                CRMContext context = new CRMContext();
                context.CopyActivityDay(MyId, User.Identity.Name, copy_date, plan_date);

                Journal journal_record = new Journal()
                {
                    operation_name = "использование опции Скопировать день", cuser_name = User.Identity.Name, table_name = "Activities",
                    text_old       = copy_date.ToShortDateString(), text_new = plan_date.ToShortDateString(), edited_date = DateTime.Now
                };
                JournalRep.AddOrUpdate(journal_record);

                return(Json(new { success = true },
                            JsonRequestBehavior.AllowGet));
            }
            catch (Exception)
            {
                return(Json(new { success = false },
                            JsonRequestBehavior.AllowGet));
            }
        }