示例#1
0
        public List <RuleEngineDetails> GetRuleList()
        {
            List <RuleEngineDetails> list = null;

            using (DataTable table = SqlDBHelper.ExecuteSelectCommand("proc_RuleEngineDetails_GetAll", CommandType.StoredProcedure))
            {
                if (table.Rows.Count > 0)
                {
                    list = new List <RuleEngineDetails>();

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

                        _rule.RuleMastID   = Convert.ToInt32(row["RuleMastID"]);
                        _rule.RuleDescID   = Convert.ToString(row["RuleDescID"]);
                        _rule.FolderPath   = Convert.ToString(row["FolderPath"]);
                        _rule.CreateDate   = Convert.ToDateTime(row["CreateDate"]);
                        _rule.ModifiedDate = Convert.ToDateTime(row["ModifiedDate"]);
                        _rule.IsActive     = Convert.ToBoolean(row["IsActive"]);

                        list.Add(_rule);
                    }
                }
            }

            return(list);
        }
示例#2
0
        public List <RuleEngineDetails> GetByRuleMastID(long RuleMastID)
        {
            List <RuleEngineDetails> list = null;

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


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

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


                        _rule.RuleDescID = Convert.ToString(row["RuleDescID"]);


                        list.Add(_rule);
                    }
                }
            }

            return(list);
        }
示例#3
0
        public bool UpdateorInsert(RuleEngineDetails _rule)
        {
            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@RuleMastID", _rule.RuleMastID),
                new SqlParameter("@RuleDescID", _rule.RuleDescID),
                new SqlParameter("@FolderPath", _rule.FolderPath),
                new SqlParameter("@UserID", _rule.UserID),

                new SqlParameter("@CreateDate", _rule.CreateDate),
                new SqlParameter("@ModifiedDate", _rule.ModifiedDate),
                new SqlParameter("@IsActive", _rule.IsActive),
            };
            return(SqlDBHelper.ExecuteNonQuery("proc_RuleEngineDetails_InsertAndUpdate", CommandType.StoredProcedure, parameters));
        }