public BizObjectLanguageDesc GetBizObjectLanguageInfo(string bizObjectType, string languageCode, int?bizObjectSysNo, string bizObjectId) { BizObjectLanguageDesc result = null; CustomDataCommand cmd = DataCommandManager.CreateCustomDataCommandFromConfig("GetBizObjectLanguageInfo"); using (var sb = new DynamicQuerySqlBuilder(cmd.CommandText, cmd, new PagingInfoEntity(), "ORDER BY SysNo")) { if (!string.IsNullOrEmpty(bizObjectType)) { sb.ConditionConstructor.AddCondition(QueryConditionRelationType.AND, "BizObjectType", DbType.String, "@BizObjectType", QueryConditionOperatorType.Equal, bizObjectType); } if (!string.IsNullOrEmpty(languageCode)) { sb.ConditionConstructor.AddCondition(QueryConditionRelationType.AND, "LanguageCode", DbType.String, "@LanguageCode", QueryConditionOperatorType.Equal, languageCode); } if (bizObjectSysNo.HasValue) { sb.ConditionConstructor.AddCondition(QueryConditionRelationType.AND, "BizObjectSysNo", DbType.Int32, "@BizObjectSysNo", QueryConditionOperatorType.Equal, bizObjectSysNo); } if (!string.IsNullOrEmpty(bizObjectId)) { sb.ConditionConstructor.AddCondition(QueryConditionRelationType.AND, "bizObjectId", DbType.String, "@bizObjectId", QueryConditionOperatorType.Equal, bizObjectId); } cmd.CommandText = sb.BuildQuerySql(); result = cmd.ExecuteEntity <BizObjectLanguageDesc>(); } return(result); }
public bool InsertBizObjectLanguageDesc(BizObjectLanguageDesc entity) { DataCommand cmd = DataCommandManager.GetDataCommand("InsertBizObjectLanguageDesc"); cmd.SetParameterValue("@BizObjectType", entity.BizObjectType); cmd.SetParameterValue("@BizObjectSysNo", entity.BizObjectSysNo); cmd.SetParameterValue("@LanguageCode", entity.LanguageCode); cmd.SetParameterValue("@BizObjectId", string.IsNullOrWhiteSpace(entity.BizObjectId) ? string.Empty : entity.BizObjectId); cmd.SetParameterValue("@Description", entity.Description); return(cmd.ExecuteNonQuery() > 0); }
public bool InsertBizObjectLanguageDesc(BizObjectLanguageDesc entity) { BizObjectLanguageDesc info = _BizLanguageDescDA.GetBizObjectLanguageInfo(entity.BizObjectType, entity.LanguageCode, entity.BizObjectSysNo, entity.BizObjectId); if (info == null) { return(_BizLanguageDescDA.InsertBizObjectLanguageDesc(entity)); } else { entity.SysNo = info.SysNo; return(UpdateBizObjectLanguageDesc(entity)); } }
public void Update(BizObjecLanguageDescVM item, Action <bool> callback) { BizObjectLanguageDesc entity = EntityConverter <BizObjecLanguageDescVM, BizObjectLanguageDesc> .Convert(item); string url = "/CommonService/BizObject/Update"; restClient.Update <bool>(url, entity, (obj, args) => { if (args.FaultsHandle()) { return; } callback(args.Result); }); }
public void Create(BizObjecLanguageDescVM item, EventHandler <RestClientEventArgs <bool> > callback) { BizObjectLanguageDesc entity = EntityConverter <BizObjecLanguageDescVM, BizObjectLanguageDesc> .Convert(item); string url = "/CommonService/BizObject/Create"; restClient.Create <bool>(url, entity, (obj, args) => { if (args.FaultsHandle()) { return; } callback(obj, args); }); }
public bool UpdateBizObjectLanguageDesc(BizObjectLanguageDesc entity) { CustomDataCommand cmd = DataCommandManager.CreateCustomDataCommandFromConfig("UpdateBizObjectLanguageDesc"); cmd.SetParameterValue("@BizObjectType", entity.BizObjectType); cmd.SetParameterValue("@LanguageCode", entity.LanguageCode); cmd.SetParameterValue("@Description", entity.Description); if (entity.BizObjectSysNo.HasValue && entity.BizObjectSysNo > 0) { cmd.CommandText = cmd.CommandText.Replace("#ObjId#", " AND BizObjectSysNo=@BizObjectSysNo"); cmd.AddInputParameter("@BizObjectSysNo", DbType.Int32, entity.BizObjectSysNo); } else if (!string.IsNullOrEmpty(entity.BizObjectId)) { cmd.CommandText = cmd.CommandText.Replace("#ObjId#", " AND BizObjectId=@BizObjectId"); cmd.AddInputParameter("@BizObjectId", DbType.String, entity.BizObjectId); } return(cmd.ExecuteNonQuery() > 0); }
public bool UpdateBizObjectLanguageDesc(BizObjectLanguageDesc entity) { return(ObjectFactory <BizObjecLanguageDescService> .Instance.UpdateBizObjectLanguageDesc(entity)); }
public bool InsertBizObjectLanguageDesc(BizObjectLanguageDesc request) { return(ObjectFactory <BizObjecLanguageDescService> .Instance.InsertBizObjectLanguageDesc(request)); }
public bool UpdateBizObjectLanguageDesc(BizObjectLanguageDesc entity) { return(ObjectFactory <BizLanguageDescProcessor> .Instance.UpdateBizObjectLanguageDesc(entity)); }
public bool UpdateBizObjectLanguageDesc(BizObjectLanguageDesc entity) { return(_BizLanguageDescDA.UpdateBizObjectLanguageDesc(entity)); }