示例#1
0
        public JArray GetActivity(ActivityFilter activityFilter)
        {
            var result = SSC.Rep.Activity.GetActivity(activityFilter);

            if (result == null)
                return null;

            var retModel = JArray.FromObject(result);

            return retModel;
        }
示例#2
0
        public JArray GetActivity2(ActivityFilter activityFilter)
        {
            var result = SSC.Rep.Activity.GetActivity(activityFilter);
            result.ForEach(x => x.MachineName = x.MachineName ?? string.Empty);

            if (result == null)
                return null;

            var retModel = JArray.FromObject(result);

            return retModel;
        }
示例#3
0
        public static List<FileActivityResult> GetActivity(ActivityFilter activityFilter)
        {
            using (var db = new SSCDbContext())
            {

                SqlParameter p1 = new SqlParameter("@Activity_Type", activityFilter.Activity_Type ?? "BOTH");
                SqlParameter p2 = new SqlParameter("@NSTID", (object)activityFilter.NSTID ?? DBNull.Value);
                SqlParameter p3 = new SqlParameter("@FAStatus", (object)activityFilter.FAStatus ?? DBNull.Value);
                SqlParameter p4 = new SqlParameter("@EngagementNumber", (object)activityFilter.EngagementNumber ?? DBNull.Value);
                SqlParameter p5 = new SqlParameter("@RequiredDate", (object)activityFilter.RequiredDate ?? DBNull.Value);
                SqlParameter p6 = new SqlParameter("@From_Dt_Range", (object)activityFilter.From_Dt_Range ?? DBNull.Value);
                SqlParameter p7 = new SqlParameter("@To_Dt_Range", (object)activityFilter.To_Dt_Range ?? DBNull.Value);
                SqlParameter p8 = new SqlParameter("@FirstRecordOnly", (object)activityFilter.FirstRecordOnly ?? DBNull.Value);
                SqlParameter p9 = new SqlParameter("@WBNumber", (object)activityFilter.WBNumber ?? DBNull.Value);
                SqlParameter p10 = new SqlParameter("@FAId", (object)activityFilter.FAId ?? DBNull.Value);

                var result = db.Database.SqlQuery<FileActivityResult>("EXEC uspGetWebAdmin @Activity_Type, @NSTID, @FAStatus, @EngagementNumber, @RequiredDate, @From_Dt_Range, @To_Dt_Range, @FirstRecordOnly, @WBNumber, @FAId"
                    , p1, p2, p3, p4, p5, p6, p7, p8, p9, p10).ToList();

                GetExtraData(result);
                return result;
            }
        }