Beispiel #1
0
        public void ActionAdd(ModDataBackupModel model)
        {
            if (model.RecordID > 0)
            {
                entity = ModDataBackupService.Instance.GetByID(model.RecordID);

                // khoi tao gia tri mac dinh khi update
            }
            else
            {
                entity = new ModDataBackupEntity();

                // khoi tao gia tri mac dinh khi insert
            }

            ViewBag.Data  = entity;
            ViewBag.Model = model;
            string s      = HttpQueryString.GetValues("Url").ToString();
            string rawUrl = HttpContext.Current.Request.RawUrl;

            string[] urls = { };
            if (!string.IsNullOrEmpty(rawUrl))
            {
                urls = rawUrl.Split('/');
            }
            int    c   = urls.Length;
            string url = urls[c - 1];

            if (!string.IsNullOrEmpty(url))
            {
                SendFileToClient(url);
            }
        }