Beispiel #1
0
        public ActionResult GetColumnExplanationsByColumnsID(int ID)
        {
            IGumruk _iGumruk = new BSGumruk();

            List <d_b_column_explanations> listExps = _iGumruk.GetDetailsByColumnID(ID);

            List <ColumnDetails> response = new List <ColumnDetails>();

            foreach (var item in listExps)
            {
                ColumnDetails clmDetails = new ColumnDetails()
                {
                    Date        = item.created_at.ToString(),
                    explanation = item.details,
                    User        = item.users.name,
                    ExpID       = item.id
                };

                response.Add(clmDetails);
            }

            return(PartialView("TableExplanations", response));
        }
Beispiel #2
0
        public JsonResult GetDetails(int ColumnID)
        {
            IGumruk _iGumruk = new BSGumruk();

            List <d_b_column_explanations> listExps = _iGumruk.GetDetailsByColumnID(ColumnID);

            List <ColumnDetails> response = new List <ColumnDetails>();

            foreach (var item in listExps)
            {
                ColumnDetails clmDetails = new ColumnDetails()
                {
                    Date        = item.created_at.ToString(),
                    explanation = item.details,
                    User        = item.users.name,
                    ExpID       = item.id
                };

                response.Add(clmDetails);
            }

            return(Json(response, JsonRequestBehavior.AllowGet));
        }