Пример #1
0
        private void hiendonhang_CheckedChanged(object sender, EventArgs e)
        {
            if (hiendonhang.Checked)
            {
                btnXacNhan.Enabled = false;
                //procQuanLyDonhang_ViewGridControl.DataSource = dsxCtr.LoadData_DonSanXuat_QuanLyDonHang_ThietKe_All();
                var db  = new MyDBContextDataContext();
                var lst = db.LoadData_DonSanXuat_QuanLyDonHang_ThietKe().ToList();
                foreach (var item in lst)
                {
                    if (item.NghiepVu_XuongDon != null)
                    {
                        item.NghiepVu_XuongDon = "True";
                    }
                    if (item.ThietKeNhan != null)
                    {
                        item.ThietKeNhan = "True";
                    }
                    if (item.ThietKeHoanThanh != null)
                    {
                        item.ThietKeHoanThanh = "True";
                    }
                    if (item.CtfNhan != null)
                    {
                        item.CtfNhan = "True";
                    }
                    if (item.CtfHoanThanh != null)
                    {
                        item.CtfHoanThanh = "True";
                    }
                    if (item.CtpNhan != null)
                    {
                        item.CtpNhan = "True";
                    }
                    if (item.CtpHoanThanh != null)
                    {
                        item.CtpHoanThanh = "True";
                    }

                    if (item.HoanThanh != null)
                    {
                        item.HoanThanh = "True";
                    }
                }
                procQuanLyDonhang_ViewGridControl.DataSource = lst;
            }
            else
            {
                frmThietKe_Load(sender, e);
                btnXacNhan.Enabled = true;
            }
        }
Пример #2
0
        //where s.SauInHoanThanh == null && s.BoPhan == "SAU IN"  || s.BoPhan == "OFFSET" || s.BoPhan == "KỸ THUẬT SỐ"
        public void Check()
        {
            //procQuanLyDonhang_ViewGridControl.DataSource = dsxCtr.LoadData_DonSanXuat_QuanLyDonHang_ThietKe();
            var db  = new MyDBContextDataContext();
            var lst = (from s in db.LoadData_DonSanXuat_QuanLyDonHang_ThietKe() where s.ThietKeHoanThanh == null && s.NghiepVu_XuongDon != null && s.HoanThanh == null select s).ToList();

            foreach (var item in lst)
            {
                if (item.NghiepVu_XuongDon != null)
                {
                    item.NghiepVu_XuongDon = "True";
                }
                if (item.ThietKeNhan != null)
                {
                    item.ThietKeNhan = "True";
                }
                if (item.ThietKeHoanThanh != null)
                {
                    item.ThietKeHoanThanh = "True";
                }
                if (item.CtfNhan != null)
                {
                    item.CtfNhan = "True";
                }
                if (item.CtfHoanThanh != null)
                {
                    item.CtfHoanThanh = "True";
                }
                if (item.CtpNhan != null)
                {
                    item.CtpNhan = "True";
                }
                if (item.CtpHoanThanh != null)
                {
                    item.CtpHoanThanh = "True";
                }
                if (item.HoanThanh != null)
                {
                    item.HoanThanh = "True";
                }
            }
            procQuanLyDonhang_ViewGridControl.DataSource = lst;
        }
Пример #3
0
        private void procQuanLyDonhang_ViewGridControl_Click(object sender, EventArgs e)
        {
            try
            {
                Databinding();
                var db  = new MyDBContextDataContext();
                var lst = (from s in db.LoadData_DonSanXuat_QuanLyDonHang_ThietKe() where s.IDQuanLyDonHang == sCDTextEdit.Text select s).Single();
                xacnhan.Text   = lst.ThietKeNhan;
                hoanthanh.Text = lst.ThietKeHoanThanh;

                //var dt = qldhCtr.GetData_IDQuanlydonhang(sCDTextEdit.Text);
                //xacnhan.Text = dt.Rows[0][2].ToString();
                //xacnhan.Text = dt.Rows[0][3].ToString();
            }
            catch (Exception)
            {
                // ignored
            }
        }