public ModelInvokeResult <WorkPlanPK> Update(string strPlanId, WorkPlan workPlan)
        {
            ModelInvokeResult <WorkPlanPK> result = new ModelInvokeResult <WorkPlanPK> {
                Success = true
            };

            try
            {
                List <IBatisNetBatchStatement> statements = new List <IBatisNetBatchStatement>();
                Guid?_PlanId = strPlanId.ToGuid();
                if (_PlanId == null)
                {
                    result.Success   = false;
                    result.ErrorCode = 59996;
                    return(result);
                }
                workPlan.PlanId = _PlanId;
                /***********************begin 自定义代码*******************/
                workPlan.OperatedBy = NormalSession.UserId.ToGuid();
                workPlan.OperatedOn = DateTime.Now;
                /***********************end 自定义代码*********************/
                statements.Add(new IBatisNetBatchStatement {
                    StatementName = workPlan.GetUpdateMethodName(), ParameterObject = workPlan.ToStringObjectDictionary(false), Type = SqlExecuteType.UPDATE
                });
                /***********************begin 自定义代码*******************/
                /***********************此处添加自定义代码*****************/
                /***********************end 自定义代码*********************/
                BuilderFactory.DefaultBulder().ExecuteNativeSqlNoneQuery(statements);
                result.instance = new WorkPlanPK {
                    PlanId = _PlanId
                };
                if (result.Success)
                {
                    SPParam spParam = new { }.ToSPParam();
                    spParam["OldManId"]  = workPlan.OldManId;
                    spParam["BatchFlag"] = 0;
                    BuilderFactory.DefaultBulder().ExecuteSPNoneQuery("SP_Pam_GenDailyWorkExcute", spParam);
                }
            }
            catch (Exception ex)
            {
                result.Success      = false;
                result.ErrorMessage = ex.Message;
            }
            return(result);
        }
        public ModelInvokeResult <WorkPlanPK> Nullify(string strPlanId)
        {
            ModelInvokeResult <WorkPlanPK> result = new ModelInvokeResult <WorkPlanPK> {
                Success = true
            };

            try
            {
                List <IBatisNetBatchStatement> statements = new List <IBatisNetBatchStatement>();
                Guid?_PlanId = strPlanId.ToGuid();
                if (_PlanId == null)
                {
                    result.Success   = false;
                    result.ErrorCode = 59996;
                    return(result);
                }
                WorkPlan workPlan = new WorkPlan {
                    PlanId = _PlanId, Status = 0
                };
                /***********************begin 自定义代码*******************/
                workPlan.OperatedBy = NormalSession.UserId.ToGuid();
                workPlan.OperatedOn = DateTime.Now;
                /***********************end 自定义代码*********************/
                statements.Add(new IBatisNetBatchStatement {
                    StatementName = workPlan.GetUpdateMethodName(), ParameterObject = workPlan.ToStringObjectDictionary(false), Type = SqlExecuteType.UPDATE
                });
                /***********************begin 自定义代码*******************/
                /***********************此处添加自定义代码*****************/
                /***********************end 自定义代码*********************/
                BuilderFactory.DefaultBulder().ExecuteNativeSqlNoneQuery(statements);
                result.instance = new WorkPlanPK {
                    PlanId = _PlanId
                };
                if (result.Success)
                {
                    OldManMappingServeManRemove(strPlanId);
                }
            }
            catch (Exception ex)
            {
                result.Success      = false;
                result.ErrorMessage = ex.Message;
            }
            return(result);
        }