public CollectionInvokeResult <Application> Query(string strParms)
        {
            CollectionInvokeResult <Application> result = new CollectionInvokeResult <Application> {
                Success = true
            };

            try
            {
                var dictionary = new StringObjectDictionary().MixInJson(strParms);
                result.rows = BuilderFactory.DefaultBulder().List <Application>(dictionary);
            }
            catch (Exception ex)
            {
                result.Success      = false;
                result.ErrorMessage = ex.Message;
            }
            return(result);
        }
        public CollectionInvokeResult <StringObjectDictionary> LoadAgencyServicesCountForBigScreen(string serveStationId)
        {
            CollectionInvokeResult <StringObjectDictionary> result = new CollectionInvokeResult <StringObjectDictionary> {
                Success = true
            };

            try
            {
                StringObjectDictionary filters = new { ServeStationId = serveStationId }.ToStringObjectDictionary();
                result.rows = BuilderFactory.DefaultBulder().ListStringObjectDictionary("GetAgencyServeCountForBigScreen", filters);
            }
            catch (Exception ex)
            {
                result.Success      = false;
                result.ErrorMessage = ex.Message;
            }
            return(result);
        }
예제 #3
0
        public CollectionInvokeResult <RoadBaseInfo> Query(string strParms)
        {
            CollectionInvokeResult <RoadBaseInfo> result = new CollectionInvokeResult <RoadBaseInfo> {
                Success = true
            };

            try
            {
                var dictionary = new StringObjectDictionary().MixInJson(strParms);
                result.rows = BuilderFactory.DefaultBulder(GetHttpHeader("ConnectId")).List <RoadBaseInfo>(dictionary);
            }
            catch (Exception ex)
            {
                result.Success      = false;
                result.ErrorMessage = ex.Message;
            }
            return(result);
        }
        public CollectionInvokeResult <StringObjectDictionary> ListByFamilyMember(string strParms)
        {
            CollectionInvokeResult <StringObjectDictionary> result = new CollectionInvokeResult <StringObjectDictionary> {
                Success = true
            };

            try
            {
                var dictionary = new StringObjectDictionary().MixInJson(strParms);
                result.rows = BuilderFactory.DefaultBulder().ListStringObjectDictionary("OldManFamilyMember_Info_List2", dictionary.ToStringObjectDictionary(false));
            }
            catch (Exception ex)
            {
                result.Success      = false;
                result.ErrorMessage = ex.Message;
            }
            return(result);
        }
예제 #5
0
        public IList <DictItemEx> GetStreetAndCommunityInArea(string parentId)
        {
            IList <DictItemEx> results = null;

            try
            {
                results = BuilderFactory.DefaultBulder(GlobalManager.getConnectString(GetHttpHeader(GlobalManager.ConnectIdKey))).List <DictItemEx>("CTE_StreetAndCommunitiy_List",
                                                                                                                                                    new
                {
                    ParentId = parentId
                }.ToStringObjectDictionary());
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
            return(results);
        }
        public CollectionInvokeResult <StringObjectDictionary> GetCautionInfoForRoom(string strParms)
        {
            CollectionInvokeResult <StringObjectDictionary> result = new CollectionInvokeResult <StringObjectDictionary> {
                Success = true
            };

            try
            {
                var dictionary = new StringObjectDictionary().MixInJson(strParms);
                result.rows = BuilderFactory.DefaultBulder().ListStringObjectDictionary("GetCautionInfo", dictionary);
            }
            catch (Exception ex)
            {
                result.Success      = false;
                result.ErrorMessage = ex.Message;
            }
            return(result);
        }
예제 #7
0
        public IList <DictItemEx2> GetDeployNode(string parentId)
        {
            IList <DictItemEx2> rows = null;

            try
            {
                rows = BuilderFactory.DefaultBulder(GlobalManager.getConnectString(GetHttpHeader(GlobalManager.ConnectIdKey))).List <DictItemEx2>("CTE_DeployNode_List",
                                                                                                                                                  new
                {
                    DictionaryId = "00005",
                    ParentId     = parentId
                }.ToStringObjectDictionary());
            }
            catch (Exception ex)
            {
            }
            return(rows);
        }
예제 #8
0
        public CollectionInvokeResult <NormalAccount> isAuth(string strParms)
        {
            JObject _jObject = JObject.Parse(strParms);
            var     code     = _jObject["code"].ToString();
            var     state    = _jObject["state"].ToString();
            string  openid   = getOpenId(code); //第一时间得到 openid
            // Util.WriteTxt("isAuth openid," + openid);
            CollectionInvokeResult <NormalAccount> result = new CollectionInvokeResult <NormalAccount> {
                Success = true
            };
            var dictionary = new StringObjectDictionary().MixInJson("{'OpenId':'" + openid + "'}");

            result.rows = BuilderFactory.DefaultBulder().List <NormalAccount>(dictionary);

            result.ErrorMessage = openid;

            return(result);
        }
        public CollectionInvokeResult <StringObjectDictionary> GetFlowNameItem()
        {
            CollectionInvokeResult <StringObjectDictionary> result = new CollectionInvokeResult <StringObjectDictionary> {
                Success = true
            };

            try
            {
                string sql = "select distinct FlowName as ItemId,FlowName as ItemCode,FlowCName as ItemName from Pub_FlowDefine where Status=1 order by FlowName asc";
                result.rows = BuilderFactory.DefaultBulder(GetHttpHeader("ConnectId")).ExecuteNativeSqlForQuery(sql);
            }
            catch (Exception ex)
            {
                result.Success      = false;
                result.ErrorMessage = ex.Message;
            }
            return(result);
        }
예제 #10
0
        public ModelInvokeResult <MenuPK> Delete(string strMenuId)
        {
            ModelInvokeResult <MenuPK> result = new ModelInvokeResult <MenuPK> {
                Success = true
            };

            try
            {
                List <IBatisNetBatchStatement> statements = new List <IBatisNetBatchStatement>();
                string _MenuId = strMenuId;
                MenuPK pk      = new MenuPK {
                    MenuId = _MenuId
                };
                DeleteCascade(statements, pk);
                statements.Add(new IBatisNetBatchStatement {
                    StatementName = new Menu().GetDeleteMethodName(), ParameterObject = pk, Type = SqlExecuteType.DELETE
                });
                /***********************begin 自定义代码*******************/
                var menu = BuilderFactory.DefaultBulder().Load <Menu, MenuPK>(new MenuPK {
                    MenuId = strMenuId
                });
                StringObjectDictionary dictionary = new
                {
                    MenuId      = strMenuId,
                    Action      = SqlExecuteType.DELETE.ToString().ToLower(),
                    OldParentId = menu.ParentId
                }.ToStringObjectDictionary();
                dictionary.Add("ErrorCode", null);
                dictionary.Add("ErrorMessage", null);

                statements.Add(new IBatisNetBatchStatement {
                    StatementName = "SP_Sys_AdjustMenu", ParameterObject = dictionary, Type = SqlExecuteType.UPDATE
                });
                /***********************end 自定义代码*********************/
                BuilderFactory.DefaultBulder().ExecuteNativeSqlNoneQuery(statements);
                result.instance = pk;
            }
            catch (Exception ex)
            {
                result.Success      = false;
                result.ErrorMessage = ex.Message;
            }
            return(result);
        }
        public ModelInvokeResult <FamilyMemberPK> Nullify(string strFamilyMemberId)
        {
            ModelInvokeResult <FamilyMemberPK> result = new ModelInvokeResult <FamilyMemberPK> {
                Success = true
            };

            try
            {
                List <IBatisNetBatchStatement> statements = new List <IBatisNetBatchStatement>();
                Guid?_FamilyMemberId = strFamilyMemberId.ToGuid();
                if (_FamilyMemberId == null)
                {
                    result.Success   = false;
                    result.ErrorCode = 59996;
                    return(result);
                }
                FamilyMember familyMember = new FamilyMember {
                    FamilyMemberId = _FamilyMemberId, Status = 0
                };
                /***********************begin 自定义代码*******************/
                familyMember.OperatedBy = NormalSession.UserId.ToGuid();
                familyMember.OperatedOn = DateTime.Now;
                familyMember.DataSource = GlobalManager.DIKey_00012_ManualEdit;
                /***********************end 自定义代码*********************/

                statements.Add(new IBatisNetBatchStatement {
                    StatementName = familyMember.GetUpdateMethodName(), ParameterObject = familyMember.ToStringObjectDictionary(false), Type = SqlExecuteType.UPDATE
                });

                /***********************begin 自定义代码*******************/
                /***********************此处添加自定义代码*****************/
                /***********************end 自定义代码*********************/
                BuilderFactory.DefaultBulder().ExecuteNativeSqlNoneQuery(statements);
                result.instance = new FamilyMemberPK {
                    FamilyMemberId = _FamilyMemberId
                };
            }
            catch (Exception ex)
            {
                result.Success      = false;
                result.ErrorMessage = ex.Message;
            }
            return(result);
        }
예제 #12
0
        public InvokeResult Create2(string articleId, IList <string> columnIds)
        {
            InvokeResult result = new InvokeResult {
                Success = true
            };

            try
            {
                List <IBatisNetBatchStatement> statements             = new List <IBatisNetBatchStatement>();
                ArticleColumn_Relation         articleColumn_relation = new ArticleColumn_Relation();

                /***********************begin 自定义代码*******************/
                articleColumn_relation.ArticleId = articleId.ToGuid();
                statements.Add(new IBatisNetBatchStatement {
                    StatementName = articleColumn_relation.GetDeleteMethodName(), ParameterObject = articleColumn_relation.ToStringObjectDictionary(false), Type = SqlExecuteType.DELETE
                });

                articleColumn_relation.OperatedBy = NormalSession.UserId.ToGuid();
                articleColumn_relation.OperatedOn = DateTime.Now;
                foreach (var item in columnIds)
                {
                    articleColumn_relation.ColumnId   = item.ToGuid();;
                    articleColumn_relation.Status     = 1;
                    articleColumn_relation.OperatedBy = NormalSession.UserId.ToGuid();
                    articleColumn_relation.OperatedOn = DateTime.Now;

                    statements.Add(new IBatisNetBatchStatement {
                        StatementName = articleColumn_relation.GetCreateMethodName(), ParameterObject = articleColumn_relation.ToStringObjectDictionary(false), Type = SqlExecuteType.INSERT
                    });
                }
                /***********************end 自定义代码*********************/
                /***********************begin 自定义代码*******************/
                /***********************此处添加自定义代码*****************/
                /***********************end 自定义代码*********************/
                BuilderFactory.DefaultBulder(GetHttpHeader("ConnectId")).ExecuteNativeSqlNoneQuery(statements);
                //result.instance = new ArticleColumn_RelationPK { Id = articleColumn.Id };
            }
            catch (Exception ex)
            {
                result.Success      = false;
                result.ErrorMessage = ex.Message;
            }
            return(result);
        }
        public InvokeResult NullifySelected(string strSubSetId, string strColumnNameNews)
        {
            InvokeResult result = new InvokeResult {
                Success = true
            };

            try
            {
                List <IBatisNetBatchStatement> statements = new List <IBatisNetBatchStatement>();
                string[] arrColumnNameNews = strColumnNameNews.Split("|".ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
                if (arrColumnNameNews.Length == 0)
                {
                    result.Success   = false;
                    result.ErrorCode = 59996;
                    return(result);
                }
                string statementName = new SubSetColumn().GetUpdateMethodName();
                string _SubSetId     = strSubSetId;
                foreach (string strColumnNameNew in arrColumnNameNews)
                {
                    string       _ColumnNameNew = strColumnNameNew;
                    SubSetColumn subSetColumn   = new SubSetColumn {
                        SubSetId = _SubSetId, ColumnNameNew = _ColumnNameNew, Status = 0
                    };
                    /***********************begin 自定义代码*******************/
                    subSetColumn.OperatedBy = NormalSession.UserId.ToGuid();
                    subSetColumn.OperatedOn = DateTime.Now;

                    //SubSetColumnPK pk = new SubSetColumnPK { SubSetId = strSubSetId, ColumnNameNew = strColumnNameNews };
                    //DeleteCascade(statements, pk);

                    statements.Add(new IBatisNetBatchStatement {
                        StatementName = statementName, ParameterObject = subSetColumn.ToStringObjectDictionary(false), Type = SqlExecuteType.UPDATE
                    });
                }
                BuilderFactory.DefaultBulder().ExecuteNativeSqlNoneQuery(statements);
            }
            catch (Exception ex)
            {
                result.Success      = false;
                result.ErrorMessage = ex.Message;
            }
            return(result);
        }
        public ModelInvokeResult <OldManMappingServeManPK> OldManMappingServeManAdd(string strParms)
        {
            ModelInvokeResult <OldManMappingServeManPK> result = new ModelInvokeResult <OldManMappingServeManPK> {
                Success = true
            };

            try
            {
                var    dictionary = new StringObjectDictionary().MixInJson(strParms);
                string oldManId   = dictionary["OldManId"].ToString();
                string userIds    = dictionary["UserIds"].ToString();
                List <IBatisNetBatchStatement> statements = new List <IBatisNetBatchStatement>();
                /***********************begin 自定义代码*******************/
                /***********************end 自定义代码*********************/
                string[] arruserIds = userIds.Split("|".ToCharArray(), StringSplitOptions.RemoveEmptyEntries);

                if (arruserIds.Length > 0)
                {
                    foreach (string arruserId in arruserIds)
                    {
                        OldManMappingServeMan oldManMappingServeManAdd = new OldManMappingServeMan();
                        oldManMappingServeManAdd.OldManId   = oldManId.ToGuid();
                        oldManMappingServeManAdd.OperatedBy = NormalSession.UserId.ToGuid();
                        oldManMappingServeManAdd.OperatedOn = DateTime.Now;
                        oldManMappingServeManAdd.BeginTime  = DateTime.Now;
                        oldManMappingServeManAdd.EndTime    = Convert.ToDateTime("2999-12-31 23:59:59");
                        oldManMappingServeManAdd.UserId     = arruserId.ToGuid();
                        statements.Add(new IBatisNetBatchStatement {
                            StatementName = oldManMappingServeManAdd.GetCreateMethodName(), ParameterObject = oldManMappingServeManAdd.ToStringObjectDictionary(false), Type = SqlExecuteType.INSERT
                        });
                    }
                    if (statements.Count > 0)
                    {
                        BuilderFactory.DefaultBulder().ExecuteNativeSqlNoneQuery(statements);
                    }
                }
            }
            catch (Exception ex)
            {
                result.Success      = false;
                result.ErrorMessage = ex.Message;
            }
            return(result);
        }
예제 #15
0
        public string OnCall(string method, string caller, string callee, string uuid)
        {
            List <string> results = new List <string>();

            try
            {
                if (method.ToLower() == "callin")
                {
                    Global.DebugInfo(string.Format("----------------------- OnCall method:{0},caller:{1},callee:{2},uuid:{3}", method, caller, callee, uuid));
                    string ip = GetHttpHeader("X-Forwarded-For");
                    if (string.IsNullOrEmpty(ip))
                    {
                        ip = GetHttpHeader("X-Real-IP");
                    }
                    if (string.IsNullOrEmpty(ip))
                    {
                        ip = GetClientIp();
                    }
                    SPParam theSPParam = new { Version = VERSION_1, Caller = caller, Callee = callee, IP = ip, UuidOfIPCC = uuid }.ToSPParam();
                    BuilderFactory.DefaultBulder().ExecuteSPNoneQuery("SP_Api_CallIn_eComm", theSPParam);
                    if (theSPParam.ErrorCode != 0)
                    {
                        results.Add(false.ToString());
                        results.Add(theSPParam.ErrorCode.ToString());
                        results.Add(theSPParam.ErrorMessage);
                    }
                    else
                    {
                        results.Add(true.ToString());
                        results.Add("0");
                        results.Add("");
                    }
                    results.Add(TypeConverter.ChangeString(theSPParam["CallQueueRet"]));
                }
            }
            catch (Exception ex)
            {
                results.Add(false.ToString());
                results.Add("-1");
                results.Add(ex.Message);
                results.Add("-1");
            }
            return(string.Join("\n\r", results.ToArray()));
        }
예제 #16
0
        public InvokeResult NullifySelected(string strSetIds)
        {
            InvokeResult result = new InvokeResult {
                Success = true
            };

            try
            {
                List <IBatisNetBatchStatement> statements = new List <IBatisNetBatchStatement>();
                string[] arrResidentIds = strSetIds.Split("|".ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
                if (arrResidentIds.Length == 0)
                {
                    result.Success   = false;
                    result.ErrorCode = 59996;
                    return(result);
                }
                string statementName = new Table().GetUpdateMethodName();
                foreach (string strTableId in arrResidentIds)
                {
                    Table TableInfo = new Table {
                        TableName = strTableId, Status = 0
                    };
                    /***********************begin 自定义代码*******************/
                    TablePK pk = new TablePK {
                        TableName = strTableId
                    };
                    //DeleteCascade(statements, pk, "update");//级联操作,暂未实现
                    TableInfo.OperatedBy = NormalSession.UserId.ToGuid();
                    TableInfo.OperatedOn = DateTime.Now;
                    //TableInfo.DataSource = GlobalManager.DIKey_00012_ManualEdit;
                    /***********************end 自定义代码*********************/
                    statements.Add(new IBatisNetBatchStatement {
                        StatementName = statementName, ParameterObject = TableInfo.ToStringObjectDictionary(false), Type = SqlExecuteType.UPDATE
                    });
                }
                BuilderFactory.DefaultBulder().ExecuteNativeSqlNoneQuery(statements);
            }
            catch (Exception ex)
            {
                result.Success      = false;
                result.ErrorMessage = ex.Message;
            }
            return(result);
        }
예제 #17
0
        public ModelInvokeResult <AreaPK> Create(Area area)
        {
            ModelInvokeResult <AreaPK> result = new ModelInvokeResult <AreaPK> {
                Success = true
            };

            try
            {
                List <IBatisNetBatchStatement> statements = new List <IBatisNetBatchStatement>();
                if (area.AreaId == GlobalManager.GuidAsAutoGenerate)
                {
                    string calcId = GetNextAreaId(area.ParentId);
                    area.AreaId = calcId.ToGuid();
                }
                statements.Add(new IBatisNetBatchStatement {
                    StatementName = area.GetCreateMethodName(), ParameterObject = area.ToStringObjectDictionary(false), Type = SqlExecuteType.INSERT
                });
                /***********************begin 自定义代码*******************/
                StringObjectDictionary dictionary = new
                {
                    AreaId      = area.AreaId.ToString(),
                    Action      = SqlExecuteType.INSERT.ToString().ToLower(),
                    OldParentId = area.ParentId
                }.ToStringObjectDictionary();
                dictionary.Add("ErrorCode", null);
                dictionary.Add("ErrorMessage", null);

                statements.Add(new IBatisNetBatchStatement {
                    StatementName = "SP_Pub_AdjustArea", ParameterObject = dictionary, Type = SqlExecuteType.UPDATE
                });
                /***********************end 自定义代码*********************/
                BuilderFactory.DefaultBulder().ExecuteNativeSqlNoneQuery(statements);
                result.instance = new AreaPK {
                    AreaId = area.AreaId
                };
            }
            catch (Exception ex)
            {
                result.Success      = false;
                result.ErrorMessage = ex.Message;
            }
            return(result);
        }
예제 #18
0
        public CollectionInvokeResult <ArticleColumn> HomeColumns(ArticleColumn param)
        {
            CollectionInvokeResult <ArticleColumn> result = new CollectionInvokeResult <ArticleColumn> {
                Success = true
            };

            try
            {
                IList <ArticleColumn> columns = BuilderFactory.DefaultBulder(GetHttpHeader("ConnectId")).List <ArticleColumn>("Cms_Index_LoadMoreColumns", param.ToStringObjectDictionary(false));

                result.rows = columns;
            }
            catch (Exception ex)
            {
                result.Success      = false;
                result.ErrorMessage = ex.Message;
            }
            return(result);
        }
예제 #19
0
        public EasyUIgridCollectionInvokeResult <StringObjectDictionary> ListCourseSchedule(EasyUIgridCollectionParam <ListCourseScheduleParam> param)
        {
            EasyUIgridCollectionInvokeResult <StringObjectDictionary> result = new EasyUIgridCollectionInvokeResult <StringObjectDictionary> {
                Success = true
            };

            try
            {
                StringObjectDictionary filters         = param.instance.ToStringObjectDictionary(false);
                DateTime      beginDate                = DateTime.Parse(param.instance.BeginDateStr);
                DateTime      endDate                  = DateTime.Parse(param.instance.EndDateStr);
                List <string> thePivotColumnsForSelect = new List <string>();
                List <string> thePivotColumns          = new List <string>();
                TimeSpan      ts = endDate - beginDate;
                DateTime      dt = beginDate;
                for (int i = 0; i < ts.Days; i++)
                {
                    thePivotColumnsForSelect.Add(string.Format("[{0}] as _{0}", dt.ToString("yyyyMMdd")));
                    thePivotColumns.Add(dt.ToString("yyyyMMdd"));
                    dt = dt.AddDays(1);
                }
                thePivotColumnsForSelect.Add(string.Format("[{0}] as _{0}", dt.ToString("yyyyMMdd")));
                thePivotColumns.Add(dt.ToString("yyyyMMdd"));
                filters.Add("PivotColumnsForSelect", string.Join(",", thePivotColumnsForSelect.ToArray()));
                filters.Add("PivotColumns", "[" + string.Join("],[", thePivotColumns.ToArray()) + "]");
                if (!string.IsNullOrEmpty(param.instance.DeviceName))
                {
                    filters.Add("DeviceName", "DeviceName like '" + param.instance.DeviceName + "%'");
                }
                if (!string.IsNullOrEmpty(param.instance.DeviceCode))
                {
                    filters.Add("DeviceCode", "DeviceCode like '" + param.instance.DeviceCode + "%'");
                }

                result.rows = BuilderFactory.DefaultBulder().ListStringObjectDictionary("CourseScheduleList", filters);
            }
            catch (Exception ex)
            {
                result.Success      = false;
                result.ErrorMessage = ex.Message;
            }
            return(result);
        }
예제 #20
0
        public ModelInvokeResult <UserPK> UpdateValidatedUser(string strUserId, User user)
        {
            ModelInvokeResult <UserPK> result = new ModelInvokeResult <UserPK> {
                Success = true
            };

            try
            {
                List <IBatisNetBatchStatement> statements = new List <IBatisNetBatchStatement>();
                Guid?_UserId = strUserId.ToGuid();
                if (_UserId == null)
                {
                    result.Success   = false;
                    result.ErrorCode = 59996;
                    return(result);
                }
                user.UserId     = _UserId;
                user.OperatedBy = NormalSession.UserId.ToGuid();
                user.OperatedOn = DateTime.Now;

                if (!string.IsNullOrEmpty(user.PasswordHash))
                {
                    user.PasswordHash = e0571.web.core.Security.MD5Provider.Generate(user.PasswordHash);
                }
                /***********************begin 自定义代码*******************/
                statements.Add(new IBatisNetBatchStatement {
                    StatementName = user.GetUpdateMethodName(), ParameterObject = user.ToStringObjectDictionary(false), Type = SqlExecuteType.UPDATE
                });
                /***********************end 自定义代码*********************/
                BuilderFactory.DefaultBulder().ExecuteNativeSqlNoneQuery(statements);
                SPParam spParam = new { }.ToSPParam();
                BuilderFactory.DefaultBulder().ExecuteSPNoneQuery("SP_DBA_SyncAuth_LisenceUser", spParam);
                result.instance = new UserPK {
                    UserId = _UserId
                };
            }
            catch (Exception ex)
            {
                result.Success      = false;
                result.ErrorMessage = ex.Message;
            }
            return(result);
        }
예제 #21
0
        public CollectionInvokeResult <StringObjectDictionary> GetOldManInfoForSelfServiceMachine()
        {
            CollectionInvokeResult <StringObjectDictionary> result = new CollectionInvokeResult <StringObjectDictionary> {
                Success = true
            };

            try
            {
                StringObjectDictionary filters = new StringObjectDictionary();
                filters["StationCode"] = GetHttpHeader("PACode");
                result.rows            = BuilderFactory.DefaultBulder().ListStringObjectDictionary("GetOldManInfoForStationByStationCode", filters);
            }
            catch (Exception ex)
            {
                result.Success      = false;
                result.ErrorMessage = ex.Message;
            }
            return(result);
        }
        public InvokeResult NullifySelected(string strTableName, string strColumnNames)
        {
            InvokeResult result = new InvokeResult {
                Success = true
            };

            try
            {
                List <IBatisNetBatchStatement> statements = new List <IBatisNetBatchStatement>();
                string[] arrColumnNames = strColumnNames.Split("|".ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
                if (arrColumnNames.Length == 0)
                {
                    result.Success   = false;
                    result.ErrorCode = 59996;
                    return(result);
                }
                foreach (string strColumnName in arrColumnNames)
                {
                    Column newColumn = new Column
                    {
                        TableName  = strTableName,
                        ColumnName = strColumnName,
                        Status     = 0,
                        OperatedBy = NormalSession.UserId.ToGuid(),
                        OperatedOn = DateTime.Now
                    };
                    //DeleteCascade(statements, pk);
                    statements.Add(new IBatisNetBatchStatement
                    {
                        StatementName   = newColumn.GetUpdateMethodName(),
                        ParameterObject = newColumn.ToStringObjectDictionary(false),
                        Type            = SqlExecuteType.UPDATE
                    });
                }
                BuilderFactory.DefaultBulder().ExecuteNativeSqlNoneQuery(statements);
            }
            catch (Exception ex)
            {
                result.Success      = false;
                result.ErrorMessage = ex.Message;
            }
            return(result);
        }
예제 #23
0
        public string searchService(string strParms)
        {
            JObject _jObject     = JObject.Parse(strParms);
            var     type         = _jObject["type"].ToString();
            var     startTime    = _jObject["startTime"].ToString();
            var     endTime      = _jObject["endTime"].ToString();
            var     followToIDNo = _jObject["followToIDNo"].ToString();

            var oldManId = ""; //老人id

            List <Search> searchs    = new List <Search>();
            SearchList    searchList = new SearchList();

            //查找老人表得到oldmanid
            var            dictionaryBound = new { IDNo = followToIDNo }.ToStringObjectDictionary();
            IList <OldMan> oldMan = BuilderFactory.DefaultBulder().List <OldMan>(dictionaryBound);

            if (oldMan.Count == 0)
            {
                searchList.sum = 0;
                return(new JavaScriptSerializer().Serialize(searchList));
            }
            else
            {
                oldManId = oldMan[0].OldManId.ToString();
            }

            //查询 服务记录
            var ret = "";

            // 查询政府服务记录
            if ("Government".Equals(type))
            {
                ret = governmentService(oldManId, startTime, endTime, searchList, searchs);
            }

            //查询 老人服务的 记录
            if ("OldMan".Equals(type))
            {
                ret = oldManService(oldManId, startTime, endTime, searchList, searchs);
            }
            return(ret);
        }
예제 #24
0
        public CollectionInvokeResult <StringObjectDictionary> GetReminderItems(string sourceTable, string sourceColumn)
        {
            CollectionInvokeResult <StringObjectDictionary> result = new CollectionInvokeResult <StringObjectDictionary> {
                Success = true
            };

            try
            {
                Guid stationId = Guid.Parse(GetHttpHeader("StationId"));
                StringObjectDictionary filters = new { SourceTable = sourceTable, SourceColumn = sourceColumn, ObjectType = "Merchant", ObjectKey = stationId }.ToStringObjectDictionary();
                result.rows = BuilderFactory.DefaultBulder().ListStringObjectDictionary("ReminderList_By_Merchant", filters);
            }
            catch (Exception ex)
            {
                result.Success      = false;
                result.ErrorMessage = ex.Message;
            }
            return(result);
        }
예제 #25
0
        public CollectionInvokeResult <StringObjectDictionary> GetWorkOrderFinishedInner()
        {
            CollectionInvokeResult <StringObjectDictionary> result = new CollectionInvokeResult <StringObjectDictionary> {
                Success = true
            };

            try
            {
                Guid stationId = Guid.Parse(GetHttpHeader("StationId"));
                StringObjectDictionary filters = new { StationId = stationId }.ToStringObjectDictionary();
                result.rows = BuilderFactory.DefaultBulder().ListStringObjectDictionary("GetWorkOrderFinished", filters);
            }
            catch (Exception ex)
            {
                result.Success      = false;
                result.ErrorMessage = ex.Message;
            }
            return(result);
        }
예제 #26
0
        public InvokeResult <EPay_OldManAccount> GetRemains(string oldManId, string serveItemB)
        {
            InvokeResult <EPay_OldManAccount> result = new InvokeResult <EPay_OldManAccount> {
                Success = true
            };

            try
            {
                result.ret = BuilderFactory.DefaultBulder().List <EPay_OldManAccount>(new EPay_OldManAccount {
                    OldManId = oldManId.ToGuid(), ServeItemB = serveItemB
                }).FirstOrDefault();
            }
            catch (Exception ex)
            {
                result.Success      = false;
                result.ErrorMessage = ex.Message;
            }
            return(result);
        }
예제 #27
0
        public CollectionInvokeResult <StringObjectDictionary> SelfListForBinding()
        {
            CollectionInvokeResult <StringObjectDictionary> result = new CollectionInvokeResult <StringObjectDictionary> {
                Success = true
            };

            try
            {
                StringObjectDictionary filters = new StringObjectDictionary();
                result.rows = BuilderFactory.DefaultBulder().ListStringObjectDictionary("EPay_Package_SelfList", filters);
            }
            catch (Exception ex)
            {
                result.Success      = false;
                result.ErrorMessage = ex.Message;
            }

            return(result);
        }
예제 #28
0
        public InvokeResult Disable(string str_job_id)
        {
            InvokeResult result = new InvokeResult()
            {
                Success = true
            };

            try
            {
                Guid?_job_id = str_job_id.ToGuid();
                if (_job_id == null)
                {
                    result.Success   = false;
                    result.ErrorCode = 59996;
                    return(result);
                }
                StringObjectDictionary paramObject = new StringObjectDictionary();
                paramObject["job_id"]                       = _job_id;
                paramObject["enabled"]                      = 0;
                paramObject["job_name"]                     = DBNull.Value;
                paramObject["new_name"]                     = DBNull.Value;
                paramObject["description"]                  = DBNull.Value;
                paramObject["start_step_id"]                = DBNull.Value;
                paramObject["category_name"]                = DBNull.Value;
                paramObject["owner_login_name"]             = DBNull.Value;
                paramObject["notify_level_eventlog"]        = DBNull.Value;
                paramObject["notify_level_email"]           = DBNull.Value;
                paramObject["notify_level_netsend"]         = DBNull.Value;
                paramObject["notify_level_page"]            = DBNull.Value;
                paramObject["notify_email_operator_name"]   = DBNull.Value;
                paramObject["notify_netsend_operator_name"] = DBNull.Value;
                paramObject["notify_page_operator_name"]    = DBNull.Value;
                paramObject["delete_level"]                 = DBNull.Value;
                paramObject["automatic_post"]               = DBNull.Value;
                BuilderFactory.DefaultBulder(GetHttpHeader(GlobalManager.ConnectIdKey)).ExecuteSPNoneQuery("SP_Tol_UpdateJob", paramObject);
            }
            catch (Exception ex)
            {
                result.Success      = false;
                result.ErrorMessage = ex.Message;
            }
            return(result);
        }
예제 #29
0
        public CollectionInvokeResult <SyncOut_ServiceWorkOrder_120701> GetSyncOutWorkOrders()
        {
            CollectionInvokeResult <SyncOut_ServiceWorkOrder_120701> result = new CollectionInvokeResult <SyncOut_ServiceWorkOrder_120701> {
                Success = true
            };

            try
            {
                result.rows = BuilderFactory.DefaultBulder().ListByPage <SyncOut_ServiceWorkOrder_120701>(new { SyncFlag = 0 }.ToStringObjectDictionary(), new ListPager {
                    OrderByClause = "CheckInTime asc", PageNo = 1, PageSize = 10
                });
            }
            catch (Exception ex)
            {
                result.Success      = false;
                result.ErrorMessage = ex.Message;
            }
            return(result);
        }
예제 #30
0
        public CollectionInvokeResult <string> OutputSQL(string strDictionaryId)
        {
            CollectionInvokeResult <string> result = new CollectionInvokeResult <string> {
                Success = true
            };

            try
            {
                string[] dictionaryIds             = strDictionaryId.Split("|".ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
                string   tableName                 = dictionaryIds[0];
                string   tableNameItem             = dictionaryIds[1];
                string   tableNameItemExtend       = dictionaryIds[2];
                string   dictionaryIdAlls          = dictionaryIds[3];
                string   dictionaryIdAll           = "";
                string   dictionaryIdAllItemExtend = "";
                if (dictionaryIds.Length > 3)
                {
                    //for (int i = 3; i < dictionaryIds.Length; i++)
                    //{
                    //    dictionaryIds[i] = "'" + dictionaryIds[i] + "'";
                    //    dictionaryIdAlls += dictionaryIds[i] + ",";
                    //}
                    dictionaryIdAll           = "where Status='1' and DictionaryId in (" + dictionaryIdAlls + ")";
                    dictionaryIdAllItemExtend = "where DictionaryId in  (" + dictionaryIdAlls + ")";
                }
                else
                {
                    dictionaryIdAll           = "";
                    dictionaryIdAllItemExtend = "";
                }
                List <string> _rows = new List <string>();
                _rows.AddRange(BuilderFactory.DefaultBulder().ExecuteSPForQuery <StringObjectDictionary>("SP_Tol_UspOutputDataEx", new { TableName = tableName, WhereClause = dictionaryIdAll }).Select(item => item["targetscript"].ToString()).ToList());
                _rows.AddRange(BuilderFactory.DefaultBulder().ExecuteSPForQuery <StringObjectDictionary>("SP_Tol_UspOutputDataEx", new { TableName = tableNameItem, WhereClause = dictionaryIdAll }).Select(item => item["targetscript"].ToString()).ToList());
                _rows.AddRange(BuilderFactory.DefaultBulder().ExecuteSPForQuery <StringObjectDictionary>("SP_Tol_UspOutputDataEx", new { TableName = tableNameItemExtend, WhereClause = dictionaryIdAllItemExtend }).Select(item => item["targetscript"].ToString()).ToList());
                result.rows = _rows;
            }
            catch (Exception ex)
            {
                result.Success      = false;
                result.ErrorMessage = ex.Message;
            }
            return(result);
        }