Ejemplo n.º 1
0
        public JsonResult GetTableExplanations(double tableID)
        {
            IGumruk _iGumruk = new BSGumruk();

            int tblID = (int)(tableID / 0.123123);

            List <d_b_table_explanation> listExps = _iGumruk.GetTableExplanationsByTableID(tblID);

            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));
        }
Ejemplo n.º 2
0
        public ActionResult GetTableExplanationsByTableID(int ID)
        {
            IGumruk _iGumruk = new BSGumruk();

            List <d_b_table_explanation> listExps = _iGumruk.GetTableExplanationsByTableID(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));
        }