public JsonResult GetScanBarcodes(int challanId) { List <string> lstDtl = new List <string>(); try { var userSessionObject = Session["UserSec"] != null ? GlobalSettings.oUserData : new UserSec(); if (string.IsNullOrEmpty(userSessionObject.UserId)) { throw new Exception("Session timed out. Please login again."); } DataTable dtblDetail = objDbTrx.GetBinderAllotDetailByChallanId(challanId, userSessionObject.UserId); if (dtblDetail.Rows.Count > 0) { for (int i = 0; i < dtblDetail.Rows.Count; i++) { lstDtl.Add(dtblDetail.Rows[i]["BINDER_ALLOT_CODE"].ToString()); } } return(Json(lstDtl, JsonRequestBehavior.AllowGet)); } catch (Exception ex) { objDbTrx.SaveSystemErrorLog(ex, Request.UserHostAddress); return(Json(new { Success = 0, Message = ex.Message }, JsonRequestBehavior.AllowGet)); } }
public ActionResult GetGetBinderLotDetails(int challanId) { List <BinderAllotQuantityDtl> lstDtl = new List <BinderAllotQuantityDtl>(); try { var userSessionObject = Session["UserSec"] != null ? GlobalSettings.oUserData : new UserSec(); if (string.IsNullOrEmpty(userSessionObject.UserId)) { throw new Exception("Session timed out. Please login again."); } DataTable dtblDetail = objDbTrx.GetBinderAllotDetailByChallanId(challanId, userSessionObject.UserId); if (dtblDetail.Rows.Count > 0) { for (int i = 0; i < dtblDetail.Rows.Count; i++) { lstDtl.Add(new BinderAllotQuantityDtl() { DTLID = Convert.ToInt64(dtblDetail.Rows[i]["DTLID"].ToString()), //BINDER_ID = Convert.ToInt32(dtblDetail.Rows[i]["BINDER_ID"].ToString()), STICKER_CODE = dtblDetail.Rows[i]["STICKER_CODE"].ToString(), BINDER_ALLOT_CODE = dtblDetail.Rows[i]["BINDER_ALLOT_CODE"].ToString(), BINDER_SHORT_CODE = dtblDetail.Rows[i]["BINDER_SHORT_CODE"].ToString(), BOOK_CODE = dtblDetail.Rows[i]["BOOK_CODE"].ToString(), SCANNED_STATUS = Convert.ToInt32(dtblDetail.Rows[i]["SCANNED_STATUS"].ToString()) }); } } } catch (Exception ex) { objDbTrx.SaveSystemErrorLog(ex, Request.UserHostAddress); } return(PartialView("~/Views/InvoiceCumChallanReqList/_ReqBinderDetail.cshtml", lstDtl)); }