Пример #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        var id = Request["ID"];
        var khId = Request["KH_ID"];
        var list = new List<PhieuXuatNhapSanPhamChiTiet>();
        var listThuChi = new List<ThuChi>();
        using (var con = DAL.con())
        {
            if (string.IsNullOrEmpty(id))
            {
                Item = ChoThueVayDal.SelectDraff(con);
                Item.Ma = Item.Ma == 0 ? 1 : Item.Ma + 1;
                Item.ID = Guid.NewGuid();
                if (!string.IsNullOrEmpty(khId))
                {
                    var kh = KhachHangDal.SelectById(new Guid(khId), con);
                    Item.KH_ID = kh.ID;
                    Item.KH_Ten = kh.Ten;
                }
            }
            else
            {
                Item = ChoThueVayDal.SelectById(con, new Guid(id));
                list = PhieuXuatNhapSanPhamChiTietDal.SelectByPxnSpId(con, id);
                listThuChi = ThuChiDal.SelectByCtvId(con, Item.ID);

            }
            Add.ListThuChi = listThuChi;
            Add.List = list;
            Add.Item = Item; ;
        }
    }
Пример #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        var id = Request["ID"];
        var khId = Request["KH_ID"];
        var list = new List<PhieuXuatNhapSanPhamChiTiet>();
        using (var con = DAL.con())
        {
            if (string.IsNullOrEmpty(id))
            {
                Item = ChoThueVayDal.SelectDraff(con);
                Item.Ma = Item.Ma == 0 ? 1 : Item.Ma + 1;
                Item.ID = Guid.NewGuid();
                if (!string.IsNullOrEmpty(khId))
                {
                    var kh = KhachHangDal.SelectById(new Guid(khId), con);
                    Item.KH_ID = kh.ID;
                    Item.KH_Ten = kh.Ten;
                }
            }
            else
            {
                Item = ChoThueVayDal.SelectById(con, new Guid(id));
                list = PhieuXuatNhapSanPhamChiTietDal.SelectByPxnSpId(con, id);

            }
            var logoStr = DanhMucDal.SelectByMa("BAOCAO-HEADER-THUCHI", con).Description;
            Add.LogoStr = logoStr;
            Add.List = list;
            Add.Item = Item; ;
        }
    }
Пример #3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        var id         = Request["ID"];
        var khId       = Request["KH_ID"];
        var list       = new List <PhieuXuatNhapSanPhamChiTiet>();
        var listThuChi = new List <ThuChi>();

        using (var con = DAL.con())
        {
            if (string.IsNullOrEmpty(id))
            {
                Item    = ChoThueVayDal.SelectDraff(con);
                Item.Ma = Item.Ma == 0 ? 1 : Item.Ma + 1;
                Item.ID = Guid.NewGuid();
                if (!string.IsNullOrEmpty(khId))
                {
                    var kh = KhachHangDal.SelectById(new Guid(khId), con);
                    Item.KH_ID  = kh.ID;
                    Item.KH_Ten = kh.Ten;
                }
            }
            else
            {
                Item       = ChoThueVayDal.SelectById(con, new Guid(id));
                list       = PhieuXuatNhapSanPhamChiTietDal.SelectByPxnSpId(con, id);
                listThuChi = ThuChiDal.SelectByCtvId(con, Item.ID);
            }
            Add.ListThuChi = listThuChi;
            Add.List       = list;
            Add.Item       = Item;;
        }
    }
Пример #4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        var id   = Request["ID"];
        var khId = Request["KH_ID"];
        var list = new List <PhieuXuatNhapSanPhamChiTiet>();

        using (var con = DAL.con())
        {
            if (string.IsNullOrEmpty(id))
            {
                Item    = ChoThueVayDal.SelectDraff(con);
                Item.Ma = Item.Ma == 0 ? 1 : Item.Ma + 1;
                Item.ID = Guid.NewGuid();
                if (!string.IsNullOrEmpty(khId))
                {
                    var kh = KhachHangDal.SelectById(new Guid(khId), con);
                    Item.KH_ID  = kh.ID;
                    Item.KH_Ten = kh.Ten;
                }
            }
            else
            {
                Item = ChoThueVayDal.SelectById(con, new Guid(id));
                list = PhieuXuatNhapSanPhamChiTietDal.SelectByPxnSpId(con, id);
            }
            var logoStr = DanhMucDal.SelectByMa("BAOCAO-HEADER-THUCHI", con).Description;
            Add.LogoStr = logoStr;
            Add.List    = list;
            Add.Item    = Item;;
        }
    }
Пример #5
0
    protected void Page_Load(object sender, EventArgs e)
    {
        var id = Request["ID"];

        using (var con = DAL.con())
        {
            if (!string.IsNullOrEmpty(id))
            {
                Item            = ChoThueVayDal.SelectById(con, new Guid(id));
                ThanhLyIn.Item  = Item;;
                ThanhLyIn.Khach = KhachHangDal.SelectById(Item.KH_ID, con);
                var logoStr = DanhMucDal.SelectByMa("BAOCAO-HEADER-THUCHI", con).Description;
                ThanhLyIn.LogoStr = logoStr;
            }
        }
    }
Пример #6
0
    protected void Page_Load(object sender, EventArgs e)
    {
        var id = Request["ID"];
        using (var con = DAL.con())
        {
            if (!string.IsNullOrEmpty(id))
            {
                Item = ChoThueVayDal.SelectById(con, new Guid(id));
                HopDongIn.Item = Item; ;
                HopDongIn.Khach = KhachHangDal.SelectById(Item.KH_ID,con);
                var logoStr = DanhMucDal.SelectByMa("BAOCAO-HEADER-THUCHI", con).Description;
                HopDongIn.LogoStr = logoStr;
            }

        }
    }