private IList <T> _getTreeData <T>(StringObjectDictionary param) where T : TreeNode, new() { if (param.ContainsKey("OrderByClause")) { param["OrderByClause"] = string.Join(",", param["OrderByClause"].ToString().Split("|".ToCharArray(), StringSplitOptions.RemoveEmptyEntries)); } param.Add("ErrorCode", null); param.Add("ErrorMessage", null); var results = BuilderFactory.DefaultBulder(GlobalManager.getConnectString(GetHttpHeader(GlobalManager.ConnectIdKey))).ExecuteSPForQuery <StringObjectDictionary>("SP_Sys_GetTreeData", param).Select(item => { T node = new T(); node.MixDictionary(item); node.pId = node.pId.Trim(); return(node); }).ToList(); return(results); }
private void formResidentBaseInfo_Load(object sender, EventArgs e) { banDingComboBoxData();//绑定下拉框的数据 StringObjectDictionary residentBaseInfo = userCtlResidentBaseInfo.dgvCurrentRow; if (residentBaseInfo == null) { formForAdd(); } else { formForEidt(residentBaseInfo); } }
public IList <Area_V> GetAreaVByKeyWord(string keyword) { string whereClause = null; StringObjectDictionary filters = new StringObjectDictionary(); List <string> whereClauses = new List <string>(); whereClauses.Add(string.Format(" ( InputCode1 like '{0}%' or AreaCode like '{0}%' or AreaName like '{0}%' ) ", keyword)); if (whereClauses.Count > 0) { whereClause = string.Join(" AND ", whereClauses.ToArray()); } return(BuilderFactory.DefaultBulder(GlobalManager.getConnectString()).List <Area_V>(new { Status = 1, WhereClause = whereClause, OrderByClause = "AreaCode asc" }.ToStringObjectDictionary(false)).Take(50).ToList()); }
public JqgridCollectionInvokeResult <Parameter> ListForJqgrid(JqgridCollectionParam <Parameter> param) { JqgridCollectionInvokeResult <Parameter> result = new JqgridCollectionInvokeResult <Parameter> { Success = true }; try { /***********************begin 复杂查询添加代码*********************/ StringObjectDictionary filters = new StringObjectDictionary(); if (param.instance != null) { filters = param.instance.ToStringObjectDictionary(false); } List <string> whereClause = new List <string>(); /**********************************************************/ /***********************begin 模糊查询*********************/ if (param.fuzzyFields != null) { foreach (var field in param.fuzzyFields) { whereClause.Add(string.Format("{0} like '%{1}%'", field.key, field.value)); } } /***********************end 模糊查询***********************/ /***********************begin 自定义代码*******************/ /***********************此处添加自定义查询代码*************/ /***********************end 自定义代码*********************/ if (whereClause.Count > 0) { filters.Add("WhereClause", string.Join(" AND ", whereClause.ToArray())); } /**********************************************************/ /***********************begin 排序*************************/ /**********************************************************/ if (!string.IsNullOrEmpty(param.sidx)) { filters.Add("OrderByClause", param.sidx + " " + param.sord ?? "ASC"); } /***********************end 排序***************************/ gridCollectionPager.JqgridDoPage <Parameter>(BuilderFactory.DefaultBulder().List <Parameter>(filters), param, ref result); } catch (Exception ex) { result.Success = false; result.ErrorMessage = ex.Message; } return(result); }
public EasyUIgridCollectionInvokeResult <StringObjectDictionary> ArtListForGrid(EasyUIgridCollectionParam <ArticleColumn> param) { EasyUIgridCollectionInvokeResult <StringObjectDictionary> result = new EasyUIgridCollectionInvokeResult <StringObjectDictionary> { Success = true }; try { List <string> whereClause = new List <string>(); StringObjectDictionary filters = new StringObjectDictionary(); if (param.instance != null) { filters = param.instance.ToStringObjectDictionary(false); } if (param.fuzzyFields != null) { List <string> fuzzys = new List <string>(); foreach (var field in param.fuzzyFields) { fuzzys.Add(string.Format("{0} like '%{1}%'", field.key, field.value)); } if (fuzzys.Count > 0) { whereClause.Add("(" + string.Join((string.IsNullOrEmpty(param.fuzzyFieldOP) ? " AND " : " " + param.fuzzyFieldOP + " "), fuzzys.ToArray()) + ")"); } } if (whereClause.Count > 0) { filters.Add("WhereClause", string.Join(" AND ", whereClause.ToArray())); } if (!string.IsNullOrEmpty(param.sort)) { filters.Add("OrderByClause", param.sort + " " + param.order ?? "ASC"); } filters.Add("PageNo", param.page); filters.Add("PageSize", param.rows); if (param.page == 1)//只第一次取 { result.total = BuilderFactory.DefaultBulder(GetHttpHeader("ConnectId")).GetRecordCount("Count_ArticleListByColByPage", filters); } result.rows = BuilderFactory.DefaultBulder(GetHttpHeader("ConnectId")).ListStringObjectDictionary("ArticleListByColByPage", filters); } catch (Exception ex) { result.Success = false; result.ErrorMessage = ex.Message; } return(result); }
public CollectionInvokeResult <StringObjectDictionary> GetWorkOrderFinished(InputWorkOrderV2Param param) { CollectionInvokeResult <StringObjectDictionary> result = new CollectionInvokeResult <StringObjectDictionary> { Success = true }; try { List <string> whereClause = new List <string>(); Guid stationId = Guid.Parse(GetHttpHeader("StationId")); StringObjectDictionary param_filters = param.ToStringObjectDictionary(false); StringObjectDictionary filters = new StringObjectDictionary(); if (param_filters != null) { foreach (var field in param_filters) { if (field.Key == "fuzzyFields") { List <string> fuzzys = new List <string>(); foreach (var fields in param.fuzzyFields) { fuzzys.Add(string.Format("{0} like '%{1}%'", fields.key, fields.value)); } if (fuzzys.Count > 0) { whereClause.Add("(" + string.Join(" or ", fuzzys.ToArray()) + ")"); } } else { filters[field.Key] = field.Value; } } } if (whereClause.Count > 0) { filters.Add("WhereClause", string.Join(" AND ", whereClause.ToArray())); } filters["StationId"] = 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); }
public IList <Area> GetArea() { string q = GetRequestQuery("q"); string whereClause = null; StringObjectDictionary filters = new StringObjectDictionary(); List <string> whereClauses = new List <string>(); whereClauses.Add(string.Format(" (AreaCode like '%{0}%' or AreaName like '%{0}%' or InputCode1 like '%{0}%') ", q)); if (whereClauses.Count > 0) { whereClause = string.Join(" AND ", whereClauses.ToArray()); } return(BuilderFactory.DefaultBulder(GlobalManager.getConnectString(GetHttpHeader(GlobalManager.ConnectIdKey))).List <Area>(new { Status = 1, WhereClause = whereClause, OrderByClause = "AreaCode asc" }.ToStringObjectDictionary(false))); }
public EasyUIgridCollectionInvokeResult <EvaluatedBaseInfo_V> ListForEasyUIgridPage_V(EasyUIgridCollectionParam <EvaluatedBaseInfo_V> param) { EasyUIgridCollectionInvokeResult <EvaluatedBaseInfo_V> result = new EasyUIgridCollectionInvokeResult <EvaluatedBaseInfo_V> { Success = true }; try { /***********************begin 复杂查询添加代码*********************/ StringObjectDictionary filters = new StringObjectDictionary(); if (param.instance != null) { filters = param.instance.ToStringObjectDictionary(false); } List <string> whereClause = new List <string>(); /**********************************************************/ /***********************begin 模糊查询*********************/ if (param.fuzzyFields != null) { List <string> fuzzys = new List <string>(); foreach (var field in param.fuzzyFields) { fuzzys.Add(string.Format("{0} like '%{1}%'", field.key, field.value)); } if (fuzzys.Count > 0) { whereClause.Add("(" + string.Join((string.IsNullOrEmpty(param.fuzzyFieldOP) ? " AND " : " " + param.fuzzyFieldOP + " "), fuzzys.ToArray()) + ")"); } } /***********************end 模糊查询***********************/ /***********************begin 自定义代码*******************/ /***********************此处添加自定义查询代码*************/ /***********************end 自定义代码*********************/ if (whereClause.Count > 0) { filters.Add("WhereClause", string.Join(" AND ", whereClause.ToArray())); } /**********************************************************/ gridCollectionPager.EasyUIgridDoPage4Model <EvaluatedBaseInfo_V>(filters, param, ref result, GetHttpHeader("ConnectId")); } catch (Exception ex) { result.Success = false; result.ErrorMessage = ex.Message; } return(result); }
private void ExportAssessmentNotice(HttpContext context, dynamic param) { try { /***********************begin 复杂查询添加代码*********************/ StringObjectDictionary filters = new StringObjectDictionary(); List <string> whereClause = new List <string>(); if (param.ReportIds != null) { List <string> fuzzys = new List <string>(); foreach (var field in param.ReportIds) { fuzzys.Add(string.Format(" '{0}' ", field)); } if (fuzzys.Count > 0) { whereClause.Add("ReportId in(" + string.Join(" , ", fuzzys.ToArray()) + ") "); } if (whereClause.Count > 0) { filters.Add("WhereClause", string.Join(" AND ", whereClause.ToArray())); } } /**********************************************************/ /***********************begin 排序*************************/ /**********************************************************/ if (!string.IsNullOrEmpty((string)param.sort)) { filters.Add("OrderByClause", (string)param.sort + " " + (string)param.order ?? "ASC"); } /***********************end 排序***************************/ string strConnectId = (string)param.ConnectId; IList <EvaluatedReport> evaluatedReportList = BuilderFactory.DefaultBulder(strConnectId).List <EvaluatedReport>(filters); string xlsName = "告知书-" + DateTime.Now.ToString("yyyy年MM月dd日") + "-" + DateTime.Now.Millisecond.ToString() + ".xls"; NPOIManager.CreateEvaluateNoticeExcel <EvaluatedReport>(context, evaluatedReportList, xlsName, "养老服务告知书", strConnectId); } catch (Exception ex) { context.Response.Write("<script type='text/javascript'>parent.alertInfo('Excel导出失败!');</script>"); context.Response.End(); } }
public EasyUIgridCollectionInvokeResult <StringObjectDictionary> OrgDeviceListByPage(EasyUIgridCollectionParam <StringObjectDictionary> param) { EasyUIgridCollectionInvokeResult <StringObjectDictionary> result = new EasyUIgridCollectionInvokeResult <StringObjectDictionary> { Success = true }; try { /***********************begin 复杂查询添加代码*********************/ StringObjectDictionary filters = new StringObjectDictionary(); List <string> whereClause = new List <string>(); if (param.filterFields != null) { foreach (var field in param.filterFields) { filters[field.key] = field.value; } } if (param.fuzzyFields != null) { List <string> fuzzys = new List <string>(); foreach (var field in param.fuzzyFields) { fuzzys.Add(string.Format("{0} like '%{1}%'", field.key, field.value)); } if (fuzzys.Count > 0) { whereClause.Add("(" + string.Join((string.IsNullOrEmpty(param.fuzzyFieldOP) ? " AND " : " " + param.fuzzyFieldOP + " "), fuzzys.ToArray()) + ")"); } } /***********************begin 自定义代码*******************/ if (whereClause.Count > 0) { filters.Add("WhereClause", string.Join(" AND ", whereClause.ToArray())); } gridCollectionPager.EasyUIgridDoPage4StringObjectDictionary("OrgDeviceListByPage", filters, param, ref result); } catch (Exception ex) { result.Success = false; result.ErrorMessage = ex.Message; } return(result); }
public EasyUIgridCollectionInvokeResult <AssessmentResult> ListForEasyUIgridByPage(EasyUIgridCollectionParam <AssessmentResult> param) { EasyUIgridCollectionInvokeResult <AssessmentResult> result = new EasyUIgridCollectionInvokeResult <AssessmentResult> { Success = true }; try { /***********************begin 复杂查询添加代码*********************/ StringObjectDictionary filters = new StringObjectDictionary(); List <string> whereClause = new List <string>(); /**********************************************************/ if (param.filterFields != null) { foreach (var field in param.filterFields) { if (field.value != "") { filters[field.key] = field.value; } } } /***********************begin 模糊查询*********************/ if (param.fuzzyFields != null) { foreach (var field in param.fuzzyFields) { whereClause.Add(string.Format("{0} like '%{1}%'", field.key, field.value)); } } /***********************end 模糊查询***********************/ /***********************begin 自定义代码*******************/ /***********************此处添加自定义查询代码*************/ /***********************end 自定义代码*********************/ if (whereClause.Count > 0) { filters.Add("WhereClause", string.Join(" AND ", whereClause.ToArray())); } gridCollectionPager.EasyUIgridDoPage4Model <AssessmentResult>(filters, param, ref result); } catch (Exception ex) { result.Success = false; result.ErrorMessage = ex.Message; } return(result); }
public EasyUIgridCollectionInvokeResult <StringObjectDictionary> ListByOldMan(EasyUIgridCollectionParam <StringObjectDictionary> param) { EasyUIgridCollectionInvokeResult <StringObjectDictionary> result = new EasyUIgridCollectionInvokeResult <StringObjectDictionary> { Success = true }; try { /***********************begin 复杂查询添加代码*********************/ StringObjectDictionary filters = new StringObjectDictionary(); List <string> whereClause = new List <string>(); /**********************************************************/ if (param.filterFields != null) { foreach (var field in param.filterFields) { filters[field.key] = field.value; } } /***********************begin 自定义代码*******************/ /***********************此处添加自定义查询代码*************/ /***********************end 自定义代码*********************/ if (whereClause.Count > 0) { filters.Add("WhereClause", string.Join(" AND ", whereClause.ToArray())); } /**********************************************************/ /***********************begin 排序*************************/ /**********************************************************/ if (!string.IsNullOrEmpty(param.sort)) { filters.Add("OrderByClause", param.sort + " " + param.order ?? "ASC"); } /***********************end 排序***************************/ result.rows = BuilderFactory.DefaultBulder().ListStringObjectDictionary("OldManLocateInfo_By_Reminder_List", filters); result.total = result.rows.Count; } catch (Exception ex) { result.Success = false; result.ErrorMessage = ex.Message; } return(result); }
public CollectionInvokeResult <OldMan> getOneOldMan(string strParms) { JObject _jObject = JObject.Parse(strParms); var openid = _jObject["openid"].ToString(); //用户 var IDNo = _jObject["IDNo"].ToString(); var OldIDNo = _jObject["OldIDNo"].ToString(); //老人 var OldName = _jObject["OldName"].ToString(); //查询老人与用户是否已经绑定 CollectionInvokeResult <NormalAccountFollow> resultFollow = new CollectionInvokeResult <NormalAccountFollow> { Success = true }; var dictionaryFollow = new StringObjectDictionary().MixInJson("{'OpenId':'" + openid + "','IDNo':'" + IDNo + "','FollowToIDNo':'" + OldIDNo + "','FollowToName':'" + OldName + "'}"); resultFollow.rows = BuilderFactory.DefaultBulder().List <NormalAccountFollow>(dictionaryFollow); CollectionInvokeResult <OldMan> result = new CollectionInvokeResult <OldMan> { Success = true }; if (resultFollow.rows.Count > 0) //如果绑定 直接返回 { result.ErrorCode = -1000; return(result); } //查询老人信息是否正确 正确绑定 var dictionary = new StringObjectDictionary().MixInJson("{'IDNo':'" + OldIDNo + "','Name':'" + OldName + "'}"); result.rows = BuilderFactory.DefaultBulder().List <OldMan>(dictionary); foreach (OldMan oldman in result.rows) { if (!string.IsNullOrEmpty(oldman.IDNo) && !string.IsNullOrEmpty(oldman.Name)) { if (!insertNormalAccountFollow(openid, IDNo, OldIDNo, OldName))//绑定老人 { result.Success = false; } return(result); } } return(result); }
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> 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); }
public CollectionInvokeResult <StringObjectDictionary> QueryServeManConfigInfo(string strParms) { CollectionInvokeResult <StringObjectDictionary> result = new CollectionInvokeResult <StringObjectDictionary> { Success = true }; try { var dictionary = new StringObjectDictionary().MixInJson(strParms); result.rows = BuilderFactory.DefaultBulder().ListStringObjectDictionary("GetServiceManConfigInfo", dictionary); } catch (Exception ex) { result.Success = false; result.ErrorMessage = ex.Message; } return(result); }
public CollectionInvokeResult <Area> Query(string strParms) { CollectionInvokeResult <Area> result = new CollectionInvokeResult <Area> { Success = true }; try { var dictionary = new StringObjectDictionary().MixInJson(strParms); result.rows = BuilderFactory.DefaultBulder().List <Area>(dictionary); } catch (Exception ex) { result.Success = false; result.ErrorMessage = ex.Message; } return(result); }
public CollectionInvokeResult <ServiceStation> ServiceStationQuery(string strParms) { CollectionInvokeResult <ServiceStation> result = new CollectionInvokeResult <ServiceStation> { Success = true }; try { var dictionary = new StringObjectDictionary().MixInJson(strParms); result.rows = BuilderFactory.DefaultBulder(GetHttpHeader("ConnectId")).List <ServiceStation>("ServiceStation_CMSList", dictionary); } catch (Exception ex) { result.Success = false; result.ErrorMessage = ex.Message; } return(result); }
public ModelInvokeResult <Flow> QueryLatest(string strParms) { ModelInvokeResult <Flow> result = new ModelInvokeResult <Flow> { Success = true }; try { var dictionary = new StringObjectDictionary().MixInJson(strParms); result.instance = BuilderFactory.DefaultBulder(GetHttpHeader("ConnectId")).List <Flow>(dictionary).FirstOrDefault(); } catch (Exception ex) { result.Success = false; result.ErrorMessage = ex.Message; } return(result); }
private void OnEnable() { // TODO HACK, UGLY WAY OF STORING DATA if (data == null) { data = new StringObjectDictionary() { { "SplitDone", false } // boolean }; } else { if (!data.ContainsKey("SplitDone")) { data.Add("SplitDone", false); } } }
public CollectionInvokeResult <StringObjectDictionary> QueryReportList(string strParms) { CollectionInvokeResult <StringObjectDictionary> result = new CollectionInvokeResult <StringObjectDictionary> { Success = true }; try { var dictionary = new StringObjectDictionary().MixInJson(strParms); result.rows = BuilderFactory.DefaultBulder(GetHttpHeader("ConnectId")).ListStringObjectDictionary("QueryEvaluatedReport_List", dictionary); } catch (Exception ex) { result.Success = false; result.ErrorMessage = ex.Message; } return(result); }
private void OnEnable() { // TODO HACK, UGLY WAY OF STORING DATA if (data == null) { data = new StringObjectDictionary() { { "WaitForSeconds", 0 } // Float }; } else { if (!data.ContainsKey("WaitForSeconds")) { data.Add("WaitForSeconds", 0); } } }
private void formForEidt(StringObjectDictionary baseInfo) { formResidentBaseInfo fm = new formResidentBaseInfo(); fm.Text = "编辑居民基本信息"; lblResidentId.Text = baseInfo["ResidentId"].ToString(); txbResidentName.Text = baseInfo["ResidentName"].ToString(); txbIDNo.Text = baseInfo["IDNo"].ToString(); txbTel.Text = baseInfo["Tel"].ToString(); txbMobile.Text = baseInfo["Mobile"].ToString(); txbPlaceOfHouseholdRegister.Text = baseInfo["PlaceOfHouseholdRegister"].ToString(); txbResidentialAddress.Text = baseInfo["ResidentialAddress"].ToString(); txbPostCode.Text = baseInfo["PostCode"].ToString(); txbRemark.Text = baseInfo["Remark"].ToString(); string gender = baseInfo["Gender"].ToString(); if (gender == "M") { rbtGenderM.Checked = true; } else if (gender == "F") { rbtGenderF.Checked = true; } else { rbtGenderM.Checked = false; rbtGenderF.Checked = false; } //cbxStreet.SelectedIndex = -1; //cbxCommunity.SelectedIndex = -1; //cbxResidentBizId.SelectedValue = Int32.Parse(baseInfo["ResidentBizId"].ToString()); //cbxAccountType.SelectedValue = Int32.Parse(baseInfo["AccountType"].ToString()); //cbxEducationLevel.SelectedValue = Int32.Parse(baseInfo["EducationLevel"].ToString()); //cbxMarriage.SelectedValue = Int32.Parse(baseInfo["Marriage"].ToString()); //cbxLivingStatus.SelectedValue = Int32.Parse(baseInfo["LivingStatus"].ToString()); //cbxHousingStatus.SelectedValue = Int32.Parse(baseInfo["HousingStatus"].ToString()); //cbxIncomeStatus.SelectedValue = Int32.Parse(baseInfo["IncomeStatus"].ToString()); //cbxNation.SelectedValue = Int32.Parse(baseInfo["Nation"].ToString()); //cbxNativePlace.SelectedValue = Int32.Parse(baseInfo["NativePlace"].ToString()); //cbxHouseholdRegister.SelectedValue = Int32.Parse(baseInfo["HouseholdRegister"].ToString()); //cbxResidentialOfHometown.SelectedValue = Int32.Parse(baseInfo["ResidentialOfHometown"].ToString()); }
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); }
public CollectionInvokeResult <DatabaseConnect> GetConnectId(string strCityCode) { CollectionInvokeResult <DatabaseConnect> result = new CollectionInvokeResult <DatabaseConnect> { Success = true }; try { StringObjectDictionary dictionary = new StringObjectDictionary(); dictionary["WhereClause"] = "ConnectId like '%" + strCityCode + "'"; result.rows = BuilderFactory.DefaultBulder().List <DatabaseConnect>(dictionary); } catch (Exception ex) { result.Success = false; result.ErrorMessage = ex.Message; } return(result); }
public CollectionInvokeResult <StringObjectDictionary> RoomEmptyBedList(Room room) { CollectionInvokeResult <StringObjectDictionary> result = new CollectionInvokeResult <StringObjectDictionary> { Success = true }; try { StringObjectDictionary filters = new StringObjectDictionary(); filters = room.ToStringObjectDictionary(false); result.rows = BuilderFactory.DefaultBulder().ListStringObjectDictionary("GetRoomEmptyBeds", filters); } catch (Exception ex) { result.Success = false; result.ErrorMessage = ex.Message; } return(result); }
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); }
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 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); }
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); }