Пример #1
0
        public bool AddNew(RuleApplicationSummary _ruleSummary)
        {
            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@RunID", _ruleSummary.RunID),
                new SqlParameter("@FileName", _ruleSummary.FileName),
                new SqlParameter("@RuleDescID", _ruleSummary.RuleDescID),
                new SqlParameter("@FieldValue", _ruleSummary.FieldValue),

                new SqlParameter("@EntryDate", _ruleSummary.EntryDate),
                new SqlParameter("@IsSuccess", _ruleSummary.IsSuccess),
            };
            return(SqlDBHelper.ExecuteNonQuery("proc_RuleApplicationSummary_AddNew", CommandType.StoredProcedure, parameters));
        }
Пример #2
0
        public RuleApplicationSummary GetRunID()
        {
            RuleApplicationSummary _ruleSummary = null;

            using (DataTable table = SqlDBHelper.ExecuteSelectCommand("proc_RuleApplicationSummary_GetRunID", CommandType.StoredProcedure))
            {
                //check if any record exist or not
                if (table.Rows.Count == 1)
                {
                    DataRow row = table.Rows[0];

                    _ruleSummary       = new RuleApplicationSummary();
                    _ruleSummary.RunID = Convert.ToInt32(row["RunID"]);
                }
            }

            return(_ruleSummary);
        }
Пример #3
0
        public List <RuleApplicationSummary> RuleApplicationSummary_LoadByRunID(long RunID)
        {
            List <RuleApplicationSummary> list = null;

            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@RunID", RunID)
            };


            using (DataTable table = SqlDBHelper.ExecuteParamerizedSelectCommand("proc_RuleApplicationSummary_LoadByRunID", CommandType.StoredProcedure, parameters))
            {
                if (table.Rows.Count > 0)
                {
                    list = new List <RuleApplicationSummary>();

                    foreach (DataRow row in table.Rows)
                    {
                        RuleApplicationSummary _rule = new RuleApplicationSummary();


                        _rule.RunID = Convert.ToInt32(row["RunID"]);

                        _rule.FileName   = Convert.ToString(row["FileName"]);
                        _rule.FieldValue = Convert.ToString(row["FieldValue"]);
                        _rule.EntryDate  = Convert.ToDateTime(row["EntryDate"]);
                        _rule.IsSuccess  = Convert.ToBoolean(row["IsSuccess"]);


                        list.Add(_rule);
                    }
                }
            }

            return(list);
        }