예제 #1
0
        internal DataBlockGroupsEntity GetDataBlockGroupsByGroupId(int DataBlockGroupId)
        {
            DataBlockGroupsEntity results = new DataBlockGroupsEntity();

            try
            {
                StoredProcedureEntity sproc = new StoredProcedureEntity();
                sproc.StoredProcedureName = "cfg.GetDataBlockGroupsByGroupId";
                sproc.StoredProceduresParameter.Add(GetParam("@DataBlockGroupId", DataBlockGroupId.ToString(), SQLServerDatatype.IntDataType));
                DataTable dt = new DataTable();
                dt = sql.ExecuteDataTable(CommandType.StoredProcedure, sproc, "");
                if (dt != null && dt.Rows.Count > 0)
                {
                    foreach (DataRow rw in dt.Rows)
                    {
                        results = new DataBlockGroupsAdapter().AdaptItem(rw);
                    }
                }
            }
            catch (Exception)
            {
                throw;
            }
            return(results);
        }
예제 #2
0
 internal string UpsertDataBlockGroups(DataBlockGroupsEntity obj)
 {
     try
     {
         StoredProcedureEntity sproc = new StoredProcedureEntity();
         sproc.StoredProcedureName = "cfg.UpsertDataBlockGroups";
         sproc.StoredProceduresParameter.Add(GetParam("@DataBlockGroupId", obj.DataBlockGroupId.ToString(), SQLServerDatatype.IntDataType));
         sproc.StoredProceduresParameter.Add(GetParam("@DataBlockGroupName", obj.DataBlockGroupName, SQLServerDatatype.VarcharDataType));
         sproc.StoredProceduresParameter.Add(GetParam("@DataBlocksIds", obj.DataBlocksIds, SQLServerDatatype.VarcharDataType));
         sproc.StoredProceduresParameter.Add(GetParam("@DataBlocks", obj.DataBlocks, SQLServerDatatype.VarcharDataType));
         sproc.StoredProceduresParameter.Add(GetParam("@APIURL", obj.APIURL, SQLServerDatatype.VarcharDataType));
         sproc.StoredProceduresParameter.Add(GetParam("@TradeUp", string.IsNullOrEmpty(obj.TradeUp) ? null : obj.TradeUp, SQLServerDatatype.VarcharDataType));
         sproc.StoredProceduresParameter.Add(GetParam("@CustomerReference", string.IsNullOrEmpty(obj.CustomerReference) ? "" : obj.CustomerReference, SQLServerDatatype.VarcharDataType));
         sql.ExecuteNoReturn(CommandType.StoredProcedure, sproc);
         return(string.Empty);
     }
     catch (Exception)
     {
         throw;
     }
 }
예제 #3
0
 public string UpsertDataBlockGroups(DataBlockGroupsEntity obj)
 {
     return(rep.UpsertDataBlockGroups(obj));
 }