Пример #1
0
        /// <summary>
        /// 保存上传文件
        /// </summary>
        /// <param name="fileBase">Post提交的文件</param>
        /// <param name="layout">房产规划项目</param>
        /// <returns>改文件的保存绝对路径</returns>
        public string SaveUploadedFile(HttpPostedFileBase fileBase, Layout layout)
        {
            var fileid = Guid.NewGuid().ToString();

            var filepath = Path.Combine(_uploadsFolder, fileid + Path.GetFileName(fileBase.FileName));

            fileBase.SaveAs(filepath);

            return filepath;
        }
Пример #2
0
 /// <summary>
 /// Deprecated Method for adding a new object to the Layouts EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToLayouts(Layout layout)
 {
     base.AddObject("Layouts", layout);
 }
Пример #3
0
        /// <summary>
        /// 处理流程流转发送逻辑
        /// </summary>
        /// <param name="_layout">待发送得项目</param>
        /// <param name="_action">目标节点</param>
        /// <param name="_todoby">目标处理岗位人员</param>
        private void SetNextStep(Layout _layout,FlowAction _action, int _todoby)
        {
            var fromlog = _layout.FlowLogs.SingleOrDefault(x => x.LogStep == _action.FromStep && x.ActiveFlag.Value);
            fromlog.Enddate = DateTime.Now;
            fromlog.ActiveFlag = false; // set the activeflag

            if (_action.DestStep.StepType != null && _action.DestStep.StepType.Value != 2)
                _layout.FlowLogs.Add(new FlowLog
                                         {
                Startdate = DateTime.Now,
                ToDoby = _todoby,
                LayoutID = _layout.LayoutID,
                LogStep = _action.ToStep,
                ActiveFlag = true
            });
            _layout.FlowState = _action.ToStep;
            _entities.SaveChanges();
        }
Пример #4
0
 /// <summary>
 /// Create a new Layout object.
 /// </summary>
 /// <param name="layoutID">Initial value of the LayoutID property.</param>
 /// <param name="flowState">Initial value of the FlowState property.</param>
 public static Layout CreateLayout(global::System.Int32 layoutID, global::System.Int32 flowState)
 {
     Layout layout = new Layout();
     layout.LayoutID = layoutID;
     layout.FlowState = flowState;
     return layout;
 }