Beispiel #1
0
        private void MovePhoto(HttpContext context)
        {
            string text  = context.Request["PhotoId"];
            string obj   = context.Request["ImageFtp"];
            string text2 = text.Trim();

            if (!string.IsNullOrEmpty(text2))
            {
                int        item  = 0;
                List <int> list  = new List <int>();
                string[]   array = text2.Split(',');
                foreach (string text3 in array)
                {
                    if (!string.IsNullOrEmpty(text3) && int.TryParse(text3, out item))
                    {
                        list.Add(item);
                    }
                }
                if (GalleryHelper.MovePhotoType(list, obj.ToInt(0)) > 0)
                {
                    base.ReturnResult(context, true, "图片移动成功!", 0, true);
                }
                return;
            }
            throw new HidistroAshxException("请至少选择一项");
        }
Beispiel #2
0
        private void btnMoveImageData_Click(object sender, System.EventArgs e)
        {
            System.Collections.Generic.List <int> list = new System.Collections.Generic.List <int>();
            int pTypeId = Globals.ToNum(this.dropImageFtp.SelectedItem.Value);

            string[] array = this.hdfSelIDList.Value.Trim(new char[]
            {
                ','
            }).Split(new char[]
            {
                ','
            });
            string[] array2 = array;
            for (int i = 0; i < array2.Length; i++)
            {
                string s   = array2[i];
                int    num = Globals.ToNum(s);
                if (num > 0)
                {
                    list.Add(num);
                }
            }
            if (GalleryHelper.MovePhotoType(list, pTypeId) > 0)
            {
                this.ShowMsg("图片移动成功!", true);
            }
            this.BindImageData();
        }
Beispiel #3
0
        public string ModelFolder(HttpContext context)
        {
            string str = context.Request.Form["file_id[]"];

            if (GalleryHelper.MovePhotoType((from x in str.Split(new char[] { ',' }).ToList <string>() select int.Parse(x)).ToList <int>(), Convert.ToInt32(context.Request.Form["cate_id"])) > 0)
            {
                return("{\"status\":1,\"msg\":\"\"}");
            }
            return("{\"status\":0,\"msg\":\"请选择一个分类\"}");
        }
        public string ModelFolder(HttpContext context)
        {
            string     text  = context.Request.Form["file_id[]"];
            List <int> pList = (from x in text.Split(',').ToList()
                                select int.Parse(x)).ToList();

            if (GalleryHelper.MovePhotoType(pList, Convert.ToInt32(context.Request.Form["cate_id"])) > 0)
            {
                return("{\"status\":1,\"msg\":\"\"}");
            }
            return("{\"status\":0,\"msg\":\"请选择一个分类\"}");
        }
Beispiel #5
0
        public string ModelFolder(System.Web.HttpContext context)
        {
            string text = context.Request.Form["file_id[]"];

            System.Collections.Generic.List <int> pList = (from x in text.Split(new char[]
            {
                ','
            }).ToList <string>()
                                                           select int.Parse(x)).ToList <int>();
            if (GalleryHelper.MovePhotoType(pList, System.Convert.ToInt32(context.Request.Form["cate_id"])) > 0)
            {
                return("{\"status\":1,\"msg\":\"\"}");
            }
            return("{\"status\":0,\"msg\":\"请选择一个分类\"}");
        }
        public string MoveImgByFolder(HttpContext context)
        {
            DbQueryResult result = GalleryHelper.GetPhotoList("", new int?(Convert.ToInt32(context.Request.Form["cid"])), 1, 0x5f5e100, PhotoListOrder.UploadTimeDesc);
            List <int>    pList  = new List <int>();
            DataTable     data   = (DataTable)result.Data;

            for (int i = 0; i < data.Rows.Count; i++)
            {
                pList.Add(Convert.ToInt32(data.Rows[i]["PhotoId"]));
            }
            if (GalleryHelper.MovePhotoType(pList, Convert.ToInt32(context.Request.Form["cate_id"])) > 0)
            {
                return("{\"status\":1,\"msg\":\"\"}");
            }
            return("{\"status\":0,\"msg\":\"请选择一个分类\"}");
        }
        public string MoveImgByFolder(System.Web.HttpContext context)
        {
            DbQueryResult photoList = GalleryHelper.GetPhotoList("", new int?(System.Convert.ToInt32(context.Request.Form["cid"])), 1, 100000000, PhotoListOrder.UploadTimeDesc, 0);

            System.Collections.Generic.List <int> list = new System.Collections.Generic.List <int>();
            System.Data.DataTable dataTable            = (System.Data.DataTable)photoList.Data;
            for (int i = 0; i < dataTable.Rows.Count; i++)
            {
                list.Add(System.Convert.ToInt32(dataTable.Rows[i]["PhotoId"]));
            }
            if (GalleryHelper.MovePhotoType(list, System.Convert.ToInt32(context.Request.Form["cate_id"])) > 0)
            {
                return("{\"status\":1,\"msg\":\"\"}");
            }
            return("{\"status\":0,\"msg\":\"请选择一个分类\"}");
        }
Beispiel #8
0
        private void btnMoveImageData_Click(object sender, EventArgs e)
        {
            List <int> pList   = new List <int>();
            int        pTypeId = Globals.ToNum(this.dropImageFtp.SelectedItem.Value);

            foreach (string str in this.hdfSelIDList.Value.Trim(new char[] { ',' }).Split(new char[] { ',' }))
            {
                int item = Globals.ToNum(str);
                if (item > 0)
                {
                    pList.Add(item);
                }
            }
            if (GalleryHelper.MovePhotoType(pList, pTypeId) > 0)
            {
                this.ShowMsg("图片移动成功!", true);
            }
            this.BindImageData();
        }
Beispiel #9
0
        private void btnMoveImageData_Click(object sender, EventArgs e)
        {
            List <int> pList   = new List <int>();
            int        pTypeId = Convert.ToInt32(this.dropImageFtp.SelectedItem.Value);

            foreach (DataListItem item in this.photoDataList.Controls)
            {
                CheckBox box = (CheckBox)item.FindControl("checkboxCol");
                if ((box != null) && box.Checked)
                {
                    int num2 = (int)this.photoDataList.DataKeys[item.ItemIndex];
                    pList.Add(num2);
                }
            }
            if (GalleryHelper.MovePhotoType(pList, pTypeId) > 0)
            {
                this.ShowMsg("图片移动成功!", true);
            }
            this.BindImageData();
        }
Beispiel #10
0
        private void btnMoveImageData_Click(object sender, System.EventArgs e)
        {
            System.Collections.Generic.List <int> list = new System.Collections.Generic.List <int>();
            int pTypeId = System.Convert.ToInt32(this.dropImageFtp.SelectedItem.Value);

            foreach (System.Web.UI.WebControls.DataListItem dataListItem in this.photoDataList.Controls)
            {
                System.Web.UI.WebControls.CheckBox checkBox = (System.Web.UI.WebControls.CheckBox)dataListItem.FindControl("checkboxCol");
                if (checkBox != null && checkBox.Checked)
                {
                    int item = (int)this.photoDataList.DataKeys[dataListItem.ItemIndex];
                    list.Add(item);
                }
            }
            if (GalleryHelper.MovePhotoType(list, pTypeId) > 0)
            {
                this.ShowMsg("图片移动成功!", true);
            }
            this.BindImageData();
        }