コード例 #1
0
        public DataTable DanhSachBuuGui_TrangThai_PhatThanhCong()
        {
            //Lay tat ca so lieu cua mot buu cuc
            db.ChuoiKetNoi = ChuoiKetNoi;
            db.TaoKetNoi();
            DataSet ds;

            ds = db.ChayThuTuc("select DeliveryDate as NgayDoiSoat, ItemCode as SoHieu, DeliveryDate as NgayGioPhat,DeliveryNote GhiChu, " +
                               "RealReciverName NguoiKyNhan, InputDate as NgayGioNhap, InputingUser NguoiNhap, ToPosCode as MaBuuCucNhap " +
                               "from Delivery " +
                               "where IsDeliverable=1 and DeliveryDate between '" + TuNgay.ToString("MM/dd/yyyy") + "' and '" + DenNgay.AddDays(1).ToString("MM/dd/yyyy") + "'");
            return(ds.Tables[0]);
        }
コード例 #2
0
        public DataTable DanhSachBuuGui_ChuyenTiep()
        {
            db.TaoKetNoi(FileConfigBCCP);
            DataSet ds;

            ds = db.ChayThuTuc("select A.ForwardDate as NgayDoiSoat, A.ItemCode as SoHieu,E.VietnameseCauseName as LyDo, A.ForwardDate as NgayNhanChuyenTiep, " +
                               "A.ReceiverFullnameOld TenNguoiNhan, A.ReceiverAddressOld DiaChiNguoiNhan, A.ReceiverTelOld ReceiverTel,B.Weight,D.Value, " +
                               "0 as CuocChinh, 0 as PhuPhiXD,0 TongCuoc, 0 VAT, B.TotalFreightVAT ThanhTien, A.ForwardPOSCode as MaBuuCucNhap " +
                               "from ItemForward A " +
                               "left join Item B on A.ItemCode=B.ItemCode " +
                               "inner join ItemVASPropertyValue D " +
                               "on D.ItemCode = A.ItemCode " +
                               "left join Cause E on A.Reason=E.CauseCode " +
                               "where A.ForwardDate between '" + TuNgay.ToString("MM/dd/yyyy") + "' and '" + DenNgay.AddDays(1).ToString("MM/dd/yyyy") + "'" + " and  D.PropertyCode = 'Amount' and isnull(D.Value, 0) <> 0 ");
            return(ds.Tables[0]);
            //Lay tat ca so lieu cua mot buu cuc

            /*db.ChuoiKetNoi = ChuoiKetNoi;
             * db.TaoKetNoi();
             * DataSet ds;
             * ds = db.ChayThuTuc("select ForwardDate as NgayDoiSoat, ItemCode as SoHieu, Reason LyDo, ForwardDate as NgayGioChuyenTiep, " +
             *          "ReceiverFullname TenNguoiNhan, ReceiverAddress DiaChiNguoiNhan, ProvinceCode MaTinh, POSCode MaBuuCuc, ForwardPOSCode MaBuuCucNhap, " +
             *          "ReceiverFullnameOld TenNguoiNhanCu, ReceiverAddressOld DiaChiNguoiNhanCu, POSCodeOld MaBuuCucCu " +
             *      "from ItemForward " +
             *      "where ForwardDate between '" + TuNgay.ToString("MM/dd/yyyy") + "' and '" + DenNgay.AddDays(1).ToString("MM/dd/yyyy") + "'");
             * return ds.Tables[0];*/
        }
コード例 #3
0
        public DataTable DanhSachBuuGui_ChuyenHoan()
        {
            //Lay tat ca so lieu cua mot buu cuc
            db.TaoKetNoi(FileConfigBCCP);
            DataSet ds;

            ds = db.ChayThuTuc("select A.ReturnDate as NgayDoiSoat, A.ItemCode as SoHieu,E.VietnameseCauseName as LyDo, A.ReturnDate as NgayNhanChuyenHoan, " +
                               "A.ReceiverFullname TenNguoiNhan, A.ReceiverAddress DiaChiNguoiNhan, A.ReceiverTel,B.Weight,D.Value, " +
                               "A.MainFreight as CuocChinh, A.FuelSurchargeFreight as PhuPhiXD, A.Freight TongCuoc, A.VATFreight VAT, A.FreightVAT ThanhTien, A.POSCode as MaBuuCucNhap " +
                               "from ItemReturn A " +
                               "left join Item B on A.ItemCode=B.ItemCode " +
                               "inner join ItemVASPropertyValue D " +
                               "on D.ItemCode = A.ItemCode " +
                               "left join Cause E on A.Reason=E.CauseCode " +
                               "where A.ReturnDate between '" + TuNgay.ToString("MM/dd/yyyy") + "' and '" + DenNgay.AddDays(1).ToString("MM/dd/yyyy") + "'" + " and  D.PropertyCode = 'Amount' and isnull(D.Value, 0) <> 0 ");
            return(ds.Tables[0]);
        }