Ejemplo n.º 1
0
        public ActionResult ManageAssetDocPic(string appraisalID, string appraisalManageType)//รูปเอกสารสิทธิ์
        {
            int thisID = Convert.ToInt32(ContentHelpers.Decode(appraisalID));

            getAppraisalAssetCode(thisID);
            string thisManageType = ContentHelpers.Decode(appraisalManageType);

            TempData["appraisalManageType"] = appraisalManageType != string.Empty ? ContentHelpers.Decode(appraisalManageType) : "";

            string userName = ContentHelpers.Decode(Convert.ToString(Session["UserName"]));

            List <UploadPictureAssetModel> listImages = AppraisalService.GetUploadPictureAsset(0, 1, thisID, userName);

            if (listImages == null)
            {
                listImages = new List <UploadPictureAssetModel>();
                for (int i = 0; i < 3; i++)
                {
                    UploadPictureAssetModel image = new UploadPictureAssetModel();
                    image.appraisal_assets_id = thisID;
                    listImages.Add(image);
                }
            }
            return(View(listImages));
        }
Ejemplo n.º 2
0
        public Boolean removeImgDB(int imageAssetId)
        {
            Boolean result   = false;
            string  userName = ContentHelpers.Decode(Convert.ToString(Session["UserName"]));
            List <UploadPictureAssetModel> listImages = AppraisalService.GetUploadPictureAsset(imageAssetId, 0, 0, userName);

            foreach (UploadPictureAssetModel model in listImages)
            {
                model.image_path = null;
                model.file_name  = null;
                result           = AppraisalService.MngUploadPicture(model, userName);
            }

            return(result);
        }