public ActionResult updateBillStatus(string onPUP, string onPUX)
        {
            string status = string.Empty;

            if (onPUP != null)
            {
                status = "PUP";
            }
            if (onPUX != null)
            {
                status = "PUX";
            }
            string                  so_van_don = Request["txtSoVanDon"].ToString();
            string                  ma_nv_nhan = Request["txtMaNV"].ToString();
            string                  ly_do      = Request["txtLyDo"].ToString() == "" ? null : Request["txtLyDo"].ToString();
            nc_billRepository       nbr        = new nc_billRepository();
            kem_gateway_bill_status kgbs       = new kem_gateway_bill_status();
            nc_bill                 nb         = new nc_bill();

            nb = nbr.GetByWaybill(so_van_don);
            kgbs.so_van_don = so_van_don;
            if (nb == null)
            {
                return(Content("Waybill not found!!"));
            }
            kgbs.ma_trang_thai = status;
            if (onPUP != null)
            {
                kgbs.ma_nv_nhan = ma_nv_nhan;
            }
            kgbs.ma_kh          = nb.customer_code_api;
            kgbs.ghi_chu        = onPUP != null ? "Nhan hang thanh cong" : ly_do;
            kgbs.sys_createby   = int.Parse(ma_nv_nhan);
            kgbs.sync           = 0;
            kgbs.so_lan         = 0;
            kgbs.sys_createdate = DateTime.Now;
            kgbs.time_status    = kgbs.time_status == DateTime.MinValue ? DateTime.Now : kgbs.time_status;
            kgbs.sys_active     = true;
            kgbs.sys_delete     = false;
            kgbs.type           = 8;
            bool i = kem_gateway_bill_statusRepository.Insert(kgbs);

            if (i)
            {
                return(Content("Succes!!"));
            }
            else
            {
                return(Content("Unsucces!!"));
            }
        }
        //[HttpGet]
        public ActionResult UpdateStatus(string id, string so_bill)
        {
            nc_billRepository nbr = new nc_billRepository();
            //kem_gateway_bill_status kgbs = new kem_gateway_bill_status();
            nc_bill nb = new nc_bill();

            nb = nbr.GetByWaybill(so_bill);
            // do something here
            ////string ma_nv_nhan = id.Trim();
            recordStaffBill rec = new recordStaffBill()
            {
                ma_nv_nhan     = id.Trim(),
                so_bill        = so_bill.Trim(),
                sender_address = nb.sender_address,
                sender_contact = nb.sender_contact,
                sender_phone   = nb.sender_phone,
            };

            ViewBag.Message = rec;
            return(View(rec));
        }