예제 #1
0
        internal MinConfidenceOverrideEntity GetAllMinConfidenceOverrideByID(int MinCCId)
        {
            MinConfidenceOverrideEntity results = new MinConfidenceOverrideEntity();

            try
            {
                StoredProcedureEntity sproc = new StoredProcedureEntity();
                sproc.StoredProcedureName = "dnb.GetMinConfidenceOverrideByID";
                sproc.StoredProceduresParameter.Add(GetParam("@id", MinCCId.ToString(), SQLServerDatatype.IntDataType));
                DataTable dt;
                dt = sql.ExecuteDataTable(CommandType.StoredProcedure, sproc);
                if (dt != null && dt.Rows.Count > 0)
                {
                    MinConfidenceOverrideAdapter adta = new MinConfidenceOverrideAdapter();
                    foreach (DataRow rw in dt.Rows)
                    {
                        results = adta.AdaptItem(rw, dt);
                    }
                }
            }
            catch (Exception)
            {
                throw;
            }
            return(results);
        }
예제 #2
0
        internal void InsertOrUpdateMinCCOverride(MinConfidenceOverrideEntity objMinCC)
        {
            string message = "";

            try
            {
                StoredProcedureEntity sproc = new StoredProcedureEntity();
                if (objMinCC.Id > 0)
                {
                    sproc.StoredProcedureName = "dnb.InsertUpdateMinConfidenceCodeOverride";
                    sproc.StoredProceduresParameter.Add(GetParam("@id", objMinCC.Id.ToString(), SQLServerDatatype.IntDataType));
                }
                else
                {
                    sproc.StoredProcedureName = "dnb.InsertUpdateMinConfidenceCodeOverride";
                }

                sproc.StoredProceduresParameter.Add(GetParam("@MinConfidenceCode", objMinCC.MinConfidenceCode.ToString().Trim(), SQLServerDatatype.IntDataType));
                sproc.StoredProceduresParameter.Add(GetParam("@MaxCandidateQty", objMinCC.MaxCandidateQty.ToString(), SQLServerDatatype.IntDataType));
                sproc.StoredProceduresParameter.Add(GetParam("@Tags", objMinCC.Tags.ToString().TrimEnd(','), SQLServerDatatype.VarcharDataType));
                sproc.StoredProceduresParameter.Add(GetParam("@UserId", objMinCC.userId.ToString().TrimEnd(','), SQLServerDatatype.IntDataType));
                sproc.StoredProceduresParameter.Add(GetParam("@IsActive", objMinCC.IsActive.ToString(), SQLServerDatatype.BitDataType));
                sql.ExecuteNoReturn(CommandType.StoredProcedure, sproc);

                message = "";
            }
            catch (Exception ex)
            {
                message = ex.Message;
                throw;
            }
        }
예제 #3
0
 public void InsertOrUpdateMinCCOverride(MinConfidenceOverrideEntity objMinCC)
 {
     rep.InsertOrUpdateMinCCOverride(objMinCC);
 }