Exemplo n.º 1
0
        public ActionResult UpdateForm(string keyValue, TrailRecordModel model)
        {
            TrailRecordEntity entity = new Entity.CustomerManage.TrailRecordEntity();

            entity.Contact       = model.Contact;
            entity.StartTime     = model.StartTime;
            entity.EndTime       = model.EndTime;
            entity.FollowUpMode  = model.FollowUpMode;
            entity.ObjectId      = model.ObjectId;
            entity.ObjectName    = model.ObjectName;
            entity.ObjectSort    = model.ObjectSort;
            entity.SaleStageName = model.SaleStageName;
            entity.SaleStageId   = model.SaleStageId;
            entity.TrackContent  = model.TrackContent;
            entity.Description   = model.Description;
            entity.TrailType     = model.TrailType;//跟进类型
            entity.FilesPath     = model.FilesPath;
            chancetrailbll.SaveForm(keyValue, entity);
            //if (!string.IsNullOrWhiteSpace(model.FilesPath))
            //{
            //    //相关文件
            //    string[] files = model.FilesPath.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries);
            //    foreach (var item in files)
            //    {
            //        //文件信息写入数据库
            //        FileInfoEntity fileInfoEntity = new FileInfoEntity();
            //        fileInfoEntity.ObjectId = entity.TrailId;
            //        fileInfoEntity.FolderId = "-1";
            //        fileInfoEntity.FileName = Path.GetFileName(item); ;
            //        fileInfoEntity.FilePath = item;
            //        fileInfoEntity.FileSize = "99";
            //        fileInfoEntity.FileExtensions = Path.GetExtension(item);
            //        fileInfoEntity.DeleteMark = 1;
            //        fileInfoEntity.FileType = fileInfoEntity.FileExtensions.Replace(".", "");
            //        fileInfoBLL.SaveForm("", fileInfoEntity);

            //    }
            //}



            return(Success("操作成功。"));
        }
Exemplo n.º 2
0
        public ActionResult SaveForm(string keyValue, TrailRecordModel model)
        {
            TrailRecordEntity entity = new Entity.CustomerManage.TrailRecordEntity();

            entity.Contact       = model.Contact;
            entity.StartTime     = model.StartTime;
            entity.EndTime       = model.EndTime;
            entity.FollowUpMode  = model.FollowUpMode;
            entity.ObjectId      = model.ObjectId;
            entity.ObjectName    = model.ObjectName;
            entity.ObjectSort    = model.ObjectSort;
            entity.SaleStageName = model.SaleStageName;
            entity.SaleStageId   = model.SaleStageId;
            entity.TrackContent  = model.TrackContent;
            entity.Description   = model.Description;
            entity.TrailType     = model.TrailType;//跟进类型
            entity.FilesPath     = model.FilesPath;
            if (model.ObjectSort == 2)
            {
                entity.ObjectName = customerBLL.GetEntity(model.ObjectId).FullName;
            }
            chancetrailbll.SaveForm(keyValue, entity);
            //if (!string.IsNullOrWhiteSpace(model.FilesPath))
            //{
            //    //相关文件
            //    string[] files = model.FilesPath.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries);
            //    foreach (var item in files)
            //    {
            //        var fileInfoEntity = fileInfoBLL.GetEntity(item);
            //        if (fileInfoEntity != null)
            //        {
            //            fileInfoEntity.ObjectId = entity.TrailId;
            //            fileInfoBLL.SaveForm(fileInfoEntity.FileId, fileInfoEntity);
            //        }
            //    }
            //}



            return(Success("操作成功。"));
        }