Exemplo n.º 1
0
        public ActionResult MarInOut4(MarInOutModels model)
        {
            //리스트 가져오기
            model = act.GetMarInOut4(model);

            ViewData["pageing"] = comM.setPaging(model.Paging);             //페이징 HTML 만들기

            return(View(model));
        }
Exemplo n.º 2
0
        //MAR 충전/ 사용 이력========================================================


        public MarInOutModels GetMarInOut1(MarInOutModels model)
        {
            HttpContext context  = HttpContext.Current;
            string      ESE_CODE = context.Session["ESE_CODE"].ToString();

            string errorStr = "";

            string listQuery = " SELECT mcr.STATUS, IFNULL(mcr.DEPOSIT_AMOUNT,0) as DEPOSIT_AMOUNT, mcr.CREATETIME, mi.DATETIME_UPD, IFNULL(mi.MAR, 0) as MAR ";
            string cntQuery  = " SELECT count(*) as cnt ";

            string baseQuery = " FROM mar_charge_req mcr left outer join mar_inout mi on mcr.SEQNO = mi.FK_SEQNO AND mi.INOUT_TYPE = 1 ";

            baseQuery += " WHERE mcr.ESE_CODE = '" + ESE_CODE + "' ";

            string endQuery = " ORDER BY mcr.SEQNO DESC limit " + ((model.Paging.page - 1) * model.Paging.pageNum) + " , " + model.Paging.pageNum; //정렬

            cntQuery  += baseQuery;                                                                                                                //토탈 카운트 쿼리
            listQuery += baseQuery + endQuery;                                                                                                     //리스트 쿼리

            int totCnt = getQueryCnt(cntQuery, out errorStr);                                                                                      //전체 리스트 갯수 구하기

            model.Paging.pageTotNum = (totCnt / model.Paging.pageNum) + 1;                                                                         //총 페이징 갯수 구하기

            DataTable listDt = getQueryResult(listQuery, out errorStr);

            if (listDt != null && listDt.Rows.Count != 0)
            {
                for (int i = 0; i < listDt.Rows.Count; i++)
                {
                    MAR_REQ_LIST temp = new MAR_REQ_LIST();

                    temp.STATUS         = int.Parse(listDt.Rows[i]["STATUS"].ToString().Trim());
                    temp.DEPOSIT_AMOUNT = double.Parse(listDt.Rows[i]["DEPOSIT_AMOUNT"].ToString().Trim());
                    temp.MAR            = double.Parse(listDt.Rows[i]["MAR"].ToString().Trim());
                    temp.CREATETIME     = listDt.Rows[i]["CREATETIME"].ToString().Trim();
                    temp.DATETIME_UPD   = listDt.Rows[i]["DATETIME_UPD"].ToString().Trim();

                    switch (temp.STATUS)
                    {
                    case 0:         temp.STATUS_TEXT = "취소";                break;

                    case 10:        temp.STATUS_TEXT = "출전신청";      break;

                    case 20:        temp.STATUS_TEXT = "입금확인불가"; break;

                    case 30:        temp.STATUS_TEXT = "충전완료";      break;
                    }

                    model.reqList.Add(temp);
                }
            }

            return(model);
        }
Exemplo n.º 3
0
        public MarInOutModels GetMarInOut4(MarInOutModels model)
        {
            HttpContext context  = HttpContext.Current;
            string      ESE_CODE = context.Session["ESE_CODE"].ToString();

            string errorStr = "";

            string listQuery = " SELECT MAR, DATETIME_UPD, INOUT_TYPE ";
            string cntQuery  = " SELECT count(*) as cnt ";

            string baseQuery = " FROM mar_inout ";

            baseQuery += " WHERE ESE_CODE = '" + ESE_CODE + "' ";

            string endQuery = " ORDER BY SEQNO DESC limit " + ((model.Paging.page - 1) * model.Paging.pageNum) + " , " + model.Paging.pageNum; //정렬

            cntQuery  += baseQuery;                                                                                                            //토탈 카운트 쿼리
            listQuery += baseQuery + endQuery;                                                                                                 //리스트 쿼리

            int totCnt = getQueryCnt(cntQuery, out errorStr);                                                                                  //전체 리스트 갯수 구하기

            model.Paging.pageTotNum = (totCnt / model.Paging.pageNum) + 1;                                                                     //총 페이징 갯수 구하기

            DataTable listDt = getQueryResult(listQuery, out errorStr);

            if (listDt != null && listDt.Rows.Count != 0)
            {
                for (int i = 0; i < listDt.Rows.Count; i++)
                {
                    MAR_INOUT_LIST temp = new MAR_INOUT_LIST();

                    temp.INOUT_TYPE   = int.Parse(listDt.Rows[i]["INOUT_TYPE"].ToString().Trim());
                    temp.MAR          = double.Parse(listDt.Rows[i]["MAR"].ToString().Trim());
                    temp.DATETIME_UPD = listDt.Rows[i]["DATETIME_UPD"].ToString().Trim();

                    switch (temp.INOUT_TYPE)
                    {
                    case 1: temp.INOUT_TYPE_TEXT = "MAR 충전 (계좌이체)"; break;

                    case 2:
                        temp.INOUT_TYPE_TEXT = "MAR 환전";
                        temp.MAR             = temp.MAR * -1;
                        break;
                    }

                    model.inOutList.Add(temp);
                }
            }

            return(model);
        }
Exemplo n.º 4
0
        // GET: Mar MAR 충전/사용 이력  MAR 충전(계좌이체)===================================
        public ActionResult MarInOut1()
        {
            MarInOutModels model = new MarInOutModels();

            //페이징 설정 초기화
            model.Paging.page    = 1;
            model.Paging.pageNum = 10;

            //리스트 가져오기
            model = act.GetMarInOut1(model);

            ViewData["pageing"] = comM.setPaging(model.Paging);             //페이징 HTML 만들기

            return(View(model));
        }
Exemplo n.º 5
0
        //  Mar 충전/사용 이력 ================================================================
        // GET: Mar Mar 충전/사용 이력
        public ActionResult MarInOut(string msg, string type)
        {
            MarInOutModels model = new MarInOutModels();

            TempData["PublicMsg"] = null;
            if (!string.IsNullOrEmpty(msg))
            {
                TempData["PublicMsg"] = msg;
            }

            TempData["getType"] = null;
            if (!string.IsNullOrEmpty(type))
            {
                TempData["getType"] = type;
            }

            return(View(model));
        }
Exemplo n.º 6
0
 public ActionResult MarInOut(MarInOutModels model)
 {
     return(View(model));
 }
Exemplo n.º 7
0
        // GET: Mar MAR 충전/사용 이력 MAR 충전(PG) - 보류===================================
        public ActionResult MarInOut2()
        {
            MarInOutModels model = new MarInOutModels();

            return(View(model));
        }