public List <Custom_DocGetList_DTO> GetList(int usrID) { document.AddInputParameters("@usrID", usrID); DataTable dt = document.GetList("sp_Document_GetList", CommandType.StoredProcedure); List <Custom_DocGetList_DTO> docList = new List <Custom_DocGetList_DTO>(); foreach (DataRow dr in dt.Rows) { docList.Add(new Custom_DocGetList_DTO { ID = Convert.ToInt64(dr["docID"]), DocContentTypeID = Convert.ToInt32(dr["DocContentTypeID"]), DocRegNo = dr["docRegNo"].ToString(), DocRegDate = Convert.ToDateTime(dr["docRegDate"]).ToString("dd/MM/yyyy"), DocContentTypeTitle = dr["DocContentType"].ToString(), DocTypeTitle = dr["DocType"].ToString(), //fromUser = dr["fromUser"].ToString(), operationTitle = (Convert.ToInt32(dr["operationID"]) != 0 ? dr["operationTitle"].ToString() : "Yeni"), operationID = Convert.ToInt32(dr["operationID"]), operationPos = Convert.ToInt32(dr["operationPos"]), doID = Convert.ToInt64(dr["doID"]), doNote = dr["doNote"].ToString(), doDate = Convert.ToDateTime(dr["doDate"]).ToString("dd/MM/yyyy"), fromUserID = Convert.ToInt32(dr["fromUserID"]), fromEmployee = dr["fromEmployee"].ToString() }); } return(docList); }