コード例 #1
0
        private void DeleteDamage(int i)
        {
            switch (i)
            {
            case 1:
                btnDmg1.Text = $"输入烂箱明细({i})";
                break;

            case 2:
                btnDmg2.Text = $"输入烂箱明细({i})";
                break;

            case 3:
                btnDmg3.Text = $"输入烂箱明细({i})";
                break;

            case 4:
                btnDmg4.Text = $"输入烂箱明细({i})";
                break;

            case 5:
                btnDmg5.Text = $"输入烂箱明细({i})";
                break;

            default:
                return;
            }
            if (damage[i - 1].ID != 0)
            {
                damage[i - 1].UPDATEDBY = Config.UserId;
                bll.DeleteDamageInfo(damage[i - 1]);
            }

            damage[i - 1] = new DataSet1.T_OCRX_DAMAGEDataTable().NewT_OCRX_DAMAGERow();
        }
コード例 #2
0
        private void button2_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(textBox2.Text))
            {
                MessageBox.Show("请输入Vessel Code.");
            }

            damageEx = bll.SelectDmgRecordEx(textBox2.Text);
            //dataSource = dataSource;
            this.dgvDmgInfoEx.DataSource = damageEx;
            if (dgvDmgInfoEx.Columns.Count == 5)
            {
                DataGridViewButtonColumn dgv_rollback_col = new DataGridViewButtonColumn();
                dgv_rollback_col.Name = "Rollback";
                dgv_rollback_col.UseColumnTextForButtonValue = true;
                dgv_rollback_col.Text       = "回退";
                dgv_rollback_col.HeaderText = "回退";
                dgvDmgInfoEx.Columns.Insert(dgvDmgInfoEx.Columns.Count, dgv_rollback_col);
            }
        }
コード例 #3
0
        public fmDmgModify(decimal dockid, string containerno)
        {
            InitializeComponent();
            txtContainerNo.Text = containerno;
            txtDockId.Text      = dockid.ToString();
            this.dockid         = dockid;
            this.containerno    = containerno;
            DataSet1.T_OCRX_DAMAGEDataTable dmginfto = bll.SelectDamageRecord(dockid);
            damage   = new DataSet1.T_OCRX_DAMAGERow[5];
            modified = new bool[] { false, false, false, false, false };
            for (int i = 0; i < dmginfto.Count; i++)
            {
                damage[i] = dmginfto[i];
                string dmgStr = string.Format("{0} {1}", dmginfto[i].DMGMEMO, dmginfto[i].DMGSIZE);
                switch (i)
                {
                case 0:
                    btnDmg1.Text = dmgStr;
                    break;

                case 1:
                    btnDmg2.Text = dmgStr;
                    break;

                case 2:
                    btnDmg3.Text = dmgStr;
                    break;

                case 3:
                    btnDmg4.Text = dmgStr;
                    break;

                case 4:
                    btnDmg5.Text = dmgStr;
                    break;

                default:
                    break;
                }
            }
        }
コード例 #4
0
        private void btnDmg1_Click(object sender, EventArgs e)
        {
            this.Cursor = Cursors.WaitCursor;
            try
            {
                if (dockid == 0)
                {
                    MessageBox.Show("请先获取新记录");
                    return;
                }

                fmDamageInput fm = new fmDamageInput();

                DialogResult drs = fm.ShowDialog();
                //DialogResult drs = MessageBox.Show("确认转异常处理?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2);
                if (drs == DialogResult.No || drs == DialogResult.Cancel)
                {
                    return;
                }

                if (fm.dmgInfo == null || string.IsNullOrEmpty(fm.dmgInfo.DamagePosition) || string.IsNullOrEmpty(fm.dmgInfo.DamageType) || string.IsNullOrEmpty(fm.dmgInfo.DamageSize))
                {
                    return;
                }
                modified[0] = true;
                string dmgStr = string.Format("{0}{1}{2} {3}", fm.dmgInfo.DamagePart, fm.dmgInfo.DamagePositionDesc, fm.dmgInfo.DamageTypeDesc, fm.dmgInfo.DamageSize);
                btnDmg1.Text = dmgStr;
                DataSet1.T_OCRX_DAMAGERow d = new DataSet1.T_OCRX_DAMAGEDataTable().NewT_OCRX_DAMAGERow();
                d.DMGCODE   = fm.dmgInfo.DamagePosition + fm.dmgInfo.DamageType;
                d.DMGMEMO   = fm.dmgInfo.DamagePart + fm.dmgInfo.DamagePositionDesc + fm.dmgInfo.DamageTypeDesc;
                d.DMGSIZE   = fm.dmgInfo.DamageSize;
                d.CREATEDBY = Config.UserId;

                if (damage == null)
                {
                    damage = new DataSet1.T_OCRX_DAMAGERow[5];
                }

                d.DOCK_ID = dockid;
                if (damage[0] != null && damage[0].ID != 0)
                {
                    damage[0].DMGCODE   = fm.dmgInfo.DamagePosition + fm.dmgInfo.DamageType;
                    damage[0].DMGMEMO   = fm.dmgInfo.DamagePart + fm.dmgInfo.DamagePositionDesc + fm.dmgInfo.DamageTypeDesc;
                    damage[0].DMGSIZE   = fm.dmgInfo.DamageSize;
                    damage[0].UPDATEDBY = Config.UserId;

                    //bll.UpdateDamageInfo(damage[0]);
                }
                else
                {
                    damage[0] = d;
                    //bll.InsertDamageInfo(damage[0]);
                }


                toolTip1.SetToolTip(btnDmg1, dmgStr);
                //bll.MarkExpcetion();

                //bll.ClearData();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
            finally
            {
                this.Cursor = Cursors.Default;
            }
        }
コード例 #5
0
ファイル: DamageController.cs プロジェクト: ZPMAI/OCR_WebAPI
 public void InsertDamage(DataSet1.T_OCRX_DAMAGEDataTable row)
 {
     webDAL.InsertDamage(row[0]);
 }
コード例 #6
0
ファイル: DamageController.cs プロジェクト: ZPMAI/OCR_WebAPI
 public void DeleteDamage(DataSet1.T_OCRX_DAMAGEDataTable row)
 {
     webDAL.DeleteDamage(row[0]);
 }
コード例 #7
0
ファイル: DamageController.cs プロジェクト: ZPMAI/OCR_WebAPI
 public void UpdateDamageInfo(DataSet1.T_OCRX_DAMAGEDataTable row)
 {
     webDAL.UpdateDamageInfo(row[0]);
 }