public RedirectToRouteResult CreateGroupMatPost(Guid ID, FormCollection FC)
        {
            Guid LinkMainCID = ID;
            Material M = new Material();
            TryUpdateModel<Material>(M, FC);
            try
            {
                Guid MatID = IM.CreateBaseGroupMaterial(M, string.Empty, LinkMainCID);

                //产品创建成功,创建图片文件
                try
                {
                    HttpPostedFileBase MatImg = Request.Files["ImagePath"];
                    MyAlbumImageUpload MyMatImg = new MyAlbumImageUpload();
                    string[] ImgPath = MyMatImg.CreateMatImgProcess(MatImg, "MaterialImg/" + LinkMainCID.ToString());
                    IM.UpdateMaterialImg(MatID, ImgPath[0], ImgPath[1], ImgPath[2]);
                }
                catch
                {
                    //Dothing
                }

                try
                {
                    HttpPostedFileBase MatFile = Request.Files["FilePath"];
                    MyNormalUploadFile MyUpload = new MyNormalUploadFile();
                    string FilePath = MyUpload.NormalUpLoadFileProcess(MatFile, "MaterialFile/" + LinkMainCID.ToString());
                    IM.UpdateMatFilePath(MatID, FilePath);
                }
                catch
                {

                }
                return RedirectToAction("UpdateGroupMaterialBase", "Material", new { ID = MatID });
            }
            catch (Exception Ex)
            {
                TempData["Error"] = Ex.Message.ToString();
                TempData["MatName"] = M.MatName;
                TempData["MatSpecifications"] = M.MatSpecifications;
                TempData["MatBrand"] = M.MatBrand;
                TempData["MatManufacturerSn"] = M.MatManufacturerSn;
                TempData["MatUnit"] = M.MatUnit;
                TempData["MatSummary"] = M.MatSummary;
                return RedirectToAction("CreateGroupMatPost", "Material", new { ID = ID });
            }
        }
 public RedirectToRouteResult MaterialImgUploadPost(Guid ID, Guid LinkMainCID)
 {
     try
     {
         HttpPostedFileBase MatImg = Request.Files["ImagePath"];
         MyAlbumImageUpload MyMatImg = new MyAlbumImageUpload();
         string[] ImgPath = MyMatImg.CreateMatImgProcess(MatImg, "MaterialImg/" + LinkMainCID.ToString());
         IM.UpdateMaterialImg(ID, ImgPath[0], ImgPath[1], ImgPath[2]);
     }
     catch (Exception Ex)
     {
         TempData["Error"] = Ex.Message.ToString();
     }
     return RedirectToAction("MaterialImgAndFileUpload", "Material", new { ID = ID });
 }