public List <Custom_DocGetList_DTO> FilterDocumentList(ExtendedSearch_DTO entity, int usrID) { document.AddInputParameters("@usrID", usrID); document.AddInputParameters("@docRegNo", entity.docRegNo); document.AddInputParameters("@docContentType", entity.docContentType); document.AddInputParameters("@docType", entity.docType); document.AddInputParameters("@fromUserID", entity.fromUserID); DataTable dt = document.GetList("sp_Document_FilteredList", 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"), DocFinishDate = Convert.ToDateTime(dr["docFinishDate"]).ToString("dd/MM/yyyy"), DocContentTypeTitle = dr["DocContentType"].ToString(), DocTypeTitle = dr["DocType"].ToString(), //fromUser = dr["fromUser"].ToString(), operationTitle = dr["operationTitle"].ToString(), //(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(), EditRead = (int.Parse(dr["EditRead"].ToString()) == 1 ? "Edit" : "Read") }); } return(docList); }
public List <ExtendedSearch_DTO> Search(ExtendedSearch_DTO entity) { searchRpst.AddInputParameters("@docContentType", entity.docContentType); searchRpst.AddInputParameters("@docRegNo", entity.docRegNo); searchRpst.AddInputParameters("@docType", entity.docType); searchRpst.AddInputParameters("@tematikaID", entity.tematikaID); searchRpst.AddInputParameters("@docContent", entity.docContent); searchRpst.AddInputParameters("@docNote", entity.docNote); DataTable dt = new DataTable(); switch (Convert.ToInt32(entity.docContentType)) { case 1: searchRpst.AddInputParameters("@actionTypeID", entity.actionTypeID); searchRpst.AddInputParameters("@conTypeID", entity.conTypeID); searchRpst.AddInputParameters("@relatedDocNo", entity.relatedDocNo); dt = searchRpst.GetList("sp_ExtendedSearchForInternals", CommandType.StoredProcedure); break; case 2: searchRpst.AddInputParameters("@appealTypeID", entity.appealTypeID); searchRpst.AddInputParameters("@sdEntryNo", entity.sdEntryNo); searchRpst.AddInputParameters("@relatedDocNo", entity.relatedDocNo); searchRpst.AddInputParameters("@officeID", entity.officeID); searchRpst.AddInputParameters("@organID", entity.organID); searchRpst.AddInputParameters("@contactTypeID", entity.contactTypeID); dt = searchRpst.GetList("sp_ExtendedSearchForServDoc", CommandType.StoredProcedure); break; case 3: searchRpst.AddInputParameters("@appealCharID", entity.appealCharID); searchRpst.AddInputParameters("@appealTypeID", entity.appealTypeID); searchRpst.AddInputParameters("@docApplyTypeID", entity.docApplyTypeID); dt = searchRpst.GetList("sp_ExtendedSearchForCitizen", CommandType.StoredProcedure); break; case 4: searchRpst.AddInputParameters("@relatedDocNo", entity.relatedDocNo); searchRpst.AddInputParameters("@officeID", entity.officeID); searchRpst.AddInputParameters("@organID", entity.organID); dt = searchRpst.GetList("sp_ExtendedSearchForOutDoc", CommandType.StoredProcedure); break; default: dt = searchRpst.GetList("sp_ExtendedSearchCommon", CommandType.StoredProcedure); break; } List <ExtendedSearch_DTO> resultList = new List <ExtendedSearch_DTO>(); foreach (DataRow dr in dt.Rows) { resultList.Add(new ExtendedSearch_DTO { docRegNo = dr["docRegNo"].ToString(), docType = dr["docType"].ToString(), dcontypeTitle = dr["dcontypeTitle"].ToString(), doctypeTitle = dr["doctypeTitle"].ToString(), docRegDate = Convert.ToDateTime(dr["docRegDate"]).ToString("dd/MM/yyyy"), docFinishDate = Convert.ToDateTime(dr["docFinishDate"]).ToString("dd/MM/yyyy"), //tematikaID = dr["tematikaID"].ToString() //ID = Convert.ToInt64(dr["docID"]), //doID = Convert.ToInt64(dr["doID"]), //DocContentTypeID = Convert.ToInt32(dr["DocContentTypeID"]), //DocRegNo = dr["docRegNo"].ToString(), //DocContentTypeTitle = dr["DocContentType"].ToString(), //DocTypeTitle = dr["DocType"].ToString(), //fromUser = dr["fromUser"].ToString(), //operationTitle = (Convert.ToInt32(dr["operationID"]) != 0 ? dr["operationTitle"].ToString() : "Yeni"), //operationID = (dr["operationID"] != null ? Convert.ToInt32(dr["operationID"]) : 0) }); } return(resultList); }
public ActionResult FilteredList(ExtendedSearch_DTO entity) { return(PartialView("_DocumentList", document.FilterDocumentList(entity, Convert.ToInt32(Session["userID"])))); //document.GetList(Convert.ToInt32(Session["userID"]))); }
public ActionResult SearchDocument(ExtendedSearch_DTO entity) { return(Json(new Srv_ExtendedSearch().Search(entity), JsonRequestBehavior.AllowGet)); }
public ActionResult UnArchivedDocumentList(ExtendedSearch_DTO entity) { return(PartialView("_UnArchivedDocumentList")); //document.GetList(Convert.ToInt32(Session["userID"]))); }