Exemplo n.º 1
0
        public void check()
        {
            var db  = new MyDBContextDataContext();
            var lst = (from s in db.LoadData_DonSanXuat_QuanLyDonHang_Sticker() where s.StickerHoanThanh == null && s.NghiepVu_XuongDon != null && s.BoPhan == sticker && s.HoanThanh == null select s).ToList();

            foreach (var item in lst)
            {
                if (item.NghiepVu_XuongDon != null)
                {
                    item.NghiepVu_XuongDon     = "True";
                    NghiepvuCheck.ValueChecked = "True";
                }

                if (item.CtfNhan != null)
                {
                    item.CtfNhan = "True";
                    CtfNhanCheck.ValueChecked = "True";
                }
                if (item.CtfHoanThanh != null)
                {
                    item.CtfHoanThanh = "True";
                    CtfHoanThanhCheck.ValueChecked = "True";
                }
                if (item.StickerNhan != null)
                {
                    item.StickerNhan = "True";
                    StickerNhanCheck.ValueChecked = "True";
                }
                if (item.StickerHoanThanh != null)
                {
                    item.StickerHoanThanh = "True";
                    StickerHoanthanhCheck.ValueChecked = "True";
                }

                if (item.KiemPhamNhan != null)
                {
                    item.KiemPhamNhan = "True";
                    KiemphamNhanCheck.ValueChecked = "True";
                }
                if (item.KiemPhamHoanThanh != null)
                {
                    item.KiemPhamHoanThanh = "True";
                    KiemphamHoanthanhCheck.ValueChecked = "True";
                }

                if (item.HoanThanh != null)
                {
                    item.HoanThanh = "True";
                    SanxuatHoanThanhCheck.ValueChecked = "True";
                }
            }
            procQuanLyDonhang_ViewGridControl.DataSource = lst;
        }
Exemplo n.º 2
0
        private void hiendonhang_CheckedChanged(object sender, EventArgs e)
        {
            if (hiendonhang.Checked == true)
            {
                btnXacNhan.Enabled = false;
                var db  = new MyDBContextDataContext();
                var lst = (from s in db.LoadData_DonSanXuat_QuanLyDonHang_Sticker() where s.BoPhan == sticker && s.NghiepVu_XuongDon != null select s).ToList();
                foreach (var item in lst)
                {
                    if (item.NghiepVu_XuongDon != null)
                    {
                        item.NghiepVu_XuongDon     = "True";
                        NghiepvuCheck.ValueChecked = "True";
                    }

                    if (item.CtfNhan != null)
                    {
                        item.CtfNhan = "True";
                        CtfNhanCheck.ValueChecked = "True";
                    }
                    if (item.CtfHoanThanh != null)
                    {
                        item.CtfHoanThanh = "True";
                        CtfHoanThanhCheck.ValueChecked = "True";
                    }
                    if (item.StickerNhan != null)
                    {
                        item.StickerNhan = "True";
                        StickerNhanCheck.ValueChecked = "True";
                    }
                    if (item.StickerHoanThanh != null)
                    {
                        item.StickerHoanThanh = "True";
                        StickerHoanthanhCheck.ValueChecked = "True";
                    }

                    if (item.KiemPhamNhan != null)
                    {
                        item.KiemPhamNhan = "True";
                        KiemphamNhanCheck.ValueChecked = "True";
                    }
                    if (item.KiemPhamHoanThanh != null)
                    {
                        item.KiemPhamHoanThanh = "True";
                        KiemphamHoanthanhCheck.ValueChecked = "True";
                    }

                    if (item.HoanThanh != null)
                    {
                        item.HoanThanh = "True";
                        SanxuatHoanThanhCheck.ValueChecked = "True";
                    }
                }
                procQuanLyDonhang_ViewGridControl.DataSource = lst;
            }
            else
            {
                frmSticker_Load(sender, e);
                btnXacNhan.Enabled = true;
            }
        }