Exemplo n.º 1
0
        /// <summary>
        /// 绑定Grid1
        /// </summary>
        public void BindGrid1()
        {
            GBJCDtsRule rule = new GBJCDtsRule();
            DataTable   dtt  = rule.RShow(HTDataConditionStr, ProcessGrid.GetQueryField(gridView1));

            gridView1.GridControl.DataSource = rule.RShow(HTDataConditionStr, ProcessGrid.GetQueryField(gridView1));
            gridView1.GridControl.Show();
        }
Exemplo n.º 2
0
        /// <summary>
        /// 绑定Grid3
        /// </summary>
        public void BindGrid3()
        {
            GBJCDtsRule rule         = new GBJCDtsRule();
            string      ConditionStr = HTDataConditionStr;

            ConditionStr += " AND GHTime IS NULL AND SubmitFlag=1";
            gridView3.GridControl.DataSource = rule.RShow(ConditionStr, ProcessGrid.GetQueryField(gridView1));
            gridView3.GridControl.Show();
        }
Exemplo n.º 3
0
        private void BindGrid()
        {
            GBJCDtsRule rule = new GBJCDtsRule();
            //DataTable dt = rule.RShow(" AND MainID=" + HTDataID + " ORDER BY Seq", ProcessGrid.GetQueryField(gridView1).Replace("SelectFlag", "0 SelectFlag"));
            DataTable dt = rule.RShow(" AND MainID=" + HTDataID + " ORDER BY Seq DESC", ProcessGrid.GetQueryField(gridView1).Replace("SelectFlag", "0 SelectFlag"));//客户要求根据产品编号排序 2013.12.27

            gridView1.GridControl.DataSource = dt;
            gridView1.GridControl.Show();
        }
Exemplo n.º 4
0
        /// <summary>
        /// 扫描条码
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void txtScanCode_KeyDown(object sender, KeyEventArgs e)
        {
            try
            {
                if (e.KeyCode == Keys.Enter)
                {
                    if (HTFormStatus != FormStatus.查询)
                    {
                        this.ShowMessage("请先保存再扫描");
                        txtScanCode.Text = string.Empty;
                        return;
                    }

                    if (HTDataSubmitFlag != (int)YesOrNo.No)
                    {
                        this.ShowMessage("只有未提交才允许扫描");
                        txtScanCode.Text = string.Empty;
                        return;
                    }

                    string ScanCode = txtScanCode.Text.Trim();
                    txtScanCode.Text = string.Empty;
                    if (ScanCode == string.Empty)
                    {
                        this.ShowMessage("请扫描挂板条形码");
                        return;
                    }
                    if (!checkScanCode(ScanCode))
                    {
                        this.ShowMessage("挂板条形码不存在,请检查后重新扫描");
                        return;
                    }
                    if (!CheckDouble(ScanCode))
                    {
                        this.ShowMessage("请勿重复扫描");
                        return;
                    }
                    if (!checkScanStatus(ScanCode))
                    {
                        return;
                    }

                    //插入明细数据
                    GBJCDts     entity = new GBJCDts();
                    GBJCDtsRule rule   = new GBJCDtsRule();
                    entity.MainID       = this.HTDataID;
                    entity.Seq          = SelectSeq(HTDataID);
                    entity.GBCode       = ScanCode;             //挂板条码
                    entity.GBStatusID   = (int)EnumGBStatus.借出; //挂板状态
                    entity.JCTime       = DateTime.Now.Date;    //借出时间
                    entity.GHOPID       = "";                   //归还操作人
                    entity.LYVendorID   = "";                   //留样客户编码
                    entity.LYVendorName = "";                   //留样客户名称
                    rule.RAdd(entity);
                    BindGrid();
                    ProcessGrid.GridViewFocus(gridView1, new string[1] {
                        "GBCode"
                    }, new string[1] {
                        ScanCode
                    });
                    txtScanCode.Focus();
                }
            }
            catch (Exception E)
            {
                this.ShowMessage(E.Message);
            }
        }