コード例 #1
0
ファイル: Hunyang.cs プロジェクト: rcw0125/vehic
        private void simpleButton1_Click(object sender, EventArgs e)
        {
            zupi();
            // 更新显示信息
            DbEntityTable <BC_DT_State> dtwzs = new DbEntityTable <BC_DT_State>();

            dtwzs.LoadDataByWhere("WpCode='" + workpointCode + "' and SHOUTONG_TIME IS NULL and WLLX='煤'");
            this.bCDTStateBindingSource.DataSource = dtwzs;
            QC_Sample_Mix.UpdateInspectMainSample();
            qyts ts = new qyts("组批成功!下一步放小样!");

            ts.ShowDialog();
        }
コード例 #2
0
        /// <summary>
        /// 保存
        /// </summary>
        private void btnSave_Click(object sender, EventArgs e)
        {
            QC_Sample_Mix sample = this.curData;

            veh.LoadDataByWhere("NoticeBillId=@NoticeBillId", this.curData.NoticeBillId);
            if (string.IsNullOrEmpty(sample.NoticeBillId))
            {
                MessageBox.Show("没有车辆信息,不能保存。");
                return;
            }

            if (string.IsNullOrEmpty(sample.CardID))
            {
                MessageBox.Show("还没有刷卡。");
                return;
            }
            if (veh.Count > 0)
            {
                sample.WLLX = veh[0].WLLX;
            }
            //if (veh[0].WLLX == "火运")
            //{ sample.NoticeBillId = veh[0].Sample_Veh_ID.ToString(); }
            sample.SampleType   = SampleType.抽查样;
            sample.Sample_Cylx  = this.Cylx;
            sample.MixCount     = 1;
            sample.MixPlanCount = 1;

            sample.SampleState = SampleState.组批完成;
            sample.Sample_TBZD = true;

            sample.ShouTong_User = LocalInfo.Current.user.ID;
            sample.ShouTong_Time = DateTime.Now;
            if (sample.DataState == DataRowState.Added)
            {
                sample.MixUser  = LocalInfo.Current.user.ID;
                sample.Mix_Time = DateTime.Now;
                examineSamples.Insert(0, sample);
            }
            sample.SaveCheckItems = true;

            sample.Save();
            btnUnBindCard.Visible = false;
            CreateSample();

            QC_Sample_Mix.UpdateInspectMainSample();

            MessageBox.Show("保存完成");
        }