Example #1
0
        /// <summary>
        /// 查找留存样
        /// </summary>
        private void btnLoadVehData_Click(object sender, EventArgs e)
        {
            string code = txtStoreCode.Text.Trim();

            if (string.IsNullOrEmpty(code))
            {
                MessageBox.Show("不能为空");
                return;
            }

            string dh = QC_Sample_Mix.GetZyDanHao(code);

            if (dh == "")
            {
                MessageBox.Show("对不起,不认识您录入的字符串格式");
                return;
            }

            QC_Sample_Mix sample = QC_Sample_Mix.GetByZydh(dh);

            if (sample != null)
            {
                curData.CopyData(sample);
            }
            else
            {
                MessageBox.Show("没有找到");
            }
        }
Example #2
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(this.curData.CardID))
            {
                MessageBox.Show("还没有刷卡。");
                return;
            }
            this.curData.Save();

            fjdhs1.LoadDataByWhere("fjdh=@fjdh and wc='否'", QC_Sample_Mix.GetZyDanHao(txtStoreCode.Text.Trim()));
            fjdhs1[0].wc = "是";
            fjdhs1.Save();
            fjdhs.LoadDataByWhere("wc=@wc", "否");
            btnUnBindCard.Visible = false;



            MessageBox.Show("保存完成");
        }
Example #3
0
        private void btnLoadVehData_Click(object sender, EventArgs e)
        {
            string code = txtStoreCode.Text.Trim();

            if (string.IsNullOrEmpty(code))
            {
                MessageBox.Show("不能为空");
                return;
            }

            string dh = QC_Sample_Mix.GetZyDanHao(code);

            if (dh != "")
            {
                Samples.LoadDataByWhere("main.ZyDanHao=@ZyDanHao", dh);
                mixgroups.LoadDataByWhere("main.Sample_mix_id=@Sample_mix_id and main.checkgroupname='角质层Y'", Samples[0].Sample_Mix_ID);
                if (mixgroups.Count > 0)
                {
                    int labid = mixgroups[0].Sample_Lab_ID;
                    mixgroups.LoadDataByWhere("main.Sample_lab_id=@Sample_lab_id and main.checkgroupname='角质层Y'", labid);
                    this.qCMixCheckGroupBindingSource.DataSource = mixgroups;
                }



                DbEntityTable <QC_Sample_Mix> curDatalist = new DbEntityTable <QC_Sample_Mix>();
                curDatalist.LoadDataByWhere("parent.ZyDanHao=@MainSampleZyDanHao and main.Sampletype=@Sampletype", dh, SampleType.检样);

                if (curDatalist.Count > 0)
                {
                    this.curData = curDatalist[0];
                }
                this.curData.CheckItems.LoadDataBySampleMixId(this.curData.Sample_Mix_ID);
                this.sourceCurData.DataSource = curData;
            }
        }