public virtual string OnWorkItemCreating(T_WorkItemBase wiBase, SysWorkItem wi) { if (WebConfigAppSettings.UseSSOModel) { using (BizDataContext context = new BizDataContext(WebConfigAppSettings.HomeBizDBConnString, true)) { wiBase.WorkItemBase_Id = context.GetNextIdentity_Int(false); context.Insert(wiBase); DbParameter parameter = context.CreateParameter(); parameter.ParameterName = context.AddPrefixToParameterName("OwnerBiz"); parameter.Value = WebConfigAppSettings.ApplicationName; string sql = string.Format("update T_WorkItemBase set OwnerBiz = {0}", parameter.ParameterName); context.ExecuteNonQuery(sql, new DbParameter[] { parameter }); return(wiBase.WorkItemBase_Id.ToString()); } } return(null); }