Beispiel #1
0
        internal int InsertDUNSregistration(DUNSregistrationEntity obj)
        {
            int result = 0;

            try
            {
                var dict = obj.ToDictionary();
                StoredProcedureEntity sproc = new StoredProcedureEntity();
                sproc.StoredProcedureName = "dnb.InsertDUNSregistration";
                sproc.StoredProceduresParameter.Add(GetParam("@MonitoringRegistrationId", Convert.ToString(obj.MonitoringRegistrationId), SQLServerDatatype.IntDataType));
                sproc.StoredProceduresParameter.Add(GetParam("@MonitoringProfileId", Convert.ToString(obj.MonitoringProfileId), SQLServerDatatype.IntDataType));
                sproc.StoredProceduresParameter.Add(GetParam("@NotificationProfileId", Convert.ToString(obj.NotificationProfileId), SQLServerDatatype.IntDataType));
                sproc.StoredProceduresParameter.Add(GetParam("@TradeUpIndicator", Convert.ToString(obj.TradeUpIndicator), SQLServerDatatype.BitDataType));
                sproc.StoredProceduresParameter.Add(GetParam("@AutoRenewalIndicator", Convert.ToString(obj.AutoRenewalIndicator), SQLServerDatatype.BitDataType));
                sproc.StoredProceduresParameter.Add(GetParam("@SubjectCategory", obj.SubjectCategory, SQLServerDatatype.VarcharDataType));
                sproc.StoredProceduresParameter.Add(GetParam("@CustomerReferenceText", obj.CustomerReferenceText, SQLServerDatatype.VarcharDataType));
                sproc.StoredProceduresParameter.Add(GetParam("@BillingEndorsementText", obj.BillingEndorsementText, SQLServerDatatype.VarcharDataType));
                sproc.StoredProceduresParameter.Add(GetParam("@Tags", obj.Tags, SQLServerDatatype.VarcharDataType));
                sproc.StoredProceduresParameter.Add(GetParam("@CredentialId", obj.CredentialId.ToString(), SQLServerDatatype.IntDataType));
                result = Convert.ToInt32(sql.ExecuteScalar(CommandType.StoredProcedure, sproc));
            }
            catch (Exception)
            {
                throw;
            }
            return(result);
        }
Beispiel #2
0
        internal DUNSregistrationEntity GetDUNSregistrationById(int id)
        {
            DUNSregistrationEntity results = new DUNSregistrationEntity();

            try
            {
                StoredProcedureEntity sproc = new StoredProcedureEntity();
                sproc.StoredProcedureName = "dnb.GetDUNSregistrationById";
                sproc.StoredProceduresParameter.Add(GetParam("@MonitoringRegistrationId", id.ToString(), SQLServerDatatype.IntDataType));
                DataTable dt;
                dt = sql.ExecuteDataTable(CommandType.StoredProcedure, sproc, "", DBIntent.Read.ToString());
                if (dt != null && dt.Rows.Count > 0)
                {
                    DUNSregistrationAdapter ta = new DUNSregistrationAdapter();
                    foreach (DataRow rw in dt.Rows)
                    {
                        results = ta.AdaptItem(rw, dt);
                    }
                }
            }
            catch (Exception)
            {
                throw;
            }
            return(results);
        }
Beispiel #3
0
        public int InsertDUNSregistration(DUNSregistrationEntity obj)
        {
            int result = rep.InsertDUNSregistration(obj);

            return(result);
        }