public static string GetNewsListImageSrc(NewsList newslist)
 {
     EnumNewsListType listType = (EnumNewsListType)newslist.ListType;
     switch (listType)
     {
         case EnumNewsListType.��ҳ��ͼƬ��������:
             return Biz.Properties.Settings.Default.��ҳ��ͼƬ���������ļ��� + newslist.CoverImageSrc;
         case EnumNewsListType.��ҳ��ͼƬ��������:
             return "";
         case EnumNewsListType.���ཹ������:
             return Biz.Properties.Settings.Default.���ཹ�������ļ��� + newslist.CoverImageSrc;
         default:
             break;
     }
     return "";
 }
        public ActionResult EditSingleNewsList(int id, EnumNewsListType listType, string txt_width, string txt_height, string txt_top, string txt_left, string txt_DropWidth, string txt_DropHeight)
        {
            int imageWidth = Int32.Parse(txt_width);
            int imageHeight = Int32.Parse(txt_height);
            int cutTop = Int32.Parse(txt_top);
            int cutLeft = (int)double.Parse(txt_left);
            int dropWidth = Int32.Parse(txt_DropWidth);
            int dropHeight = Int32.Parse(txt_DropHeight);
            News news = BizNews.Get(id);
            string folder = "";
            switch (listType)
            {
                case EnumNewsListType.��ҳ��ͼƬ��������:
                    folder = Hotnet.Biz.Properties.Settings.Default.��ҳ��ͼƬ���������ļ���;
                    break;
                case EnumNewsListType.��ҳ��ͼƬ��������:
                    folder = "";
                    break;
                case EnumNewsListType.���ཹ������:
                    folder = Hotnet.Biz.Properties.Settings.Default.���ཹ�������ļ���;
                    break;
                default:
                    break;
            }
            NewsList nl = new NewsList();
            nl.NewsID = news.NewsID;
            nl.IsPublished = (int)EnumPublishState.����;
            nl.ListType = (int)listType;
            nl.AddTime = DateTime.Now;

            string imageName = null;
            string dir = StringUtility.GetSavePath(id, out imageName);
            string LocalPath = dir + imageName + "_o" + Path.GetExtension(news.ImagePath);

            string filename = CutPhotoHelp.SaveCutPic(Server.MapPath(news.ImagePath), Server.MapPath(folder + LocalPath), 0, 0, dropWidth,
                                    dropHeight, cutLeft, cutTop, imageWidth, imageHeight);
            nl.CoverImageSrc = LocalPath;

            BizNewsList.Delete(nl.NewsID, listType);
            BizNewsList.Insert(nl);

            return RedirectToAction("SetNewsList", new { id = news.NewsID, listType = (int)listType });
        }
		private void detach_NewsList(NewsList entity)
		{
			this.SendPropertyChanging();
			entity.News = null;
		}
		private void attach_NewsList(NewsList entity)
		{
			this.SendPropertyChanging();
			entity.News = this;
		}
 partial void DeleteNewsList(NewsList instance);
 partial void UpdateNewsList(NewsList instance);
 partial void InsertNewsList(NewsList instance);