Beispiel #1
0
        /// <summary>
        /// 添加批次信息
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Btn_Add_Click(object sender, EventArgs e)
        {
            //获取当前列表所属来源单位id
            string    unitCode = dgv_SWDJ.Tag == null ? string.Empty : dgv_SWDJ.Tag.ToString();
            Frm_AddPC frm      = new Frm_AddPC(true, unitCode);

            if (frm.ShowDialog() == DialogResult.OK)
            {
                LoadPCDataScoure(null);
            }
        }
Beispiel #2
0
 private void dgv_SWDJ_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     if (e.RowIndex != -1 && e.ColumnIndex != -1)
     {
         string name = dgv_SWDJ.Columns[e.ColumnIndex].Name;
         //批次名称-点击事件
         if ("trp_name".Equals(name))
         {
             object    currentRowId = dgv_SWDJ.Rows[e.RowIndex].Cells["trp_id"].Value;
             Frm_AddPC frm          = new Frm_AddPC(false, currentRowId.ToString());
             if (frm.ShowDialog() == DialogResult.OK)
             {
                 LoadPCDataScoure(null);
             }
         }
         //光盘编号点击>>移动文件
         else if ("trc_code".Equals(name))
         {
             object trcId    = dgv_SWDJ.Rows[e.RowIndex].Cells["trc_id"].Value;
             string querySQL = "SELECT bfi_id FROM backup_files_info A LEFT JOIN transfer_registraion_cd B ON A.bfi_trcid = B.trc_id " +
                               $"WHERE bfi_trcid='{trcId}' AND bfi_type = -1 ORDER BY trc_code";
             object[] rootId = SqlHelper.ExecuteSingleColumnQuery(querySQL);
             if (rootId.Length > 0)
             {
                 object         trcCode    = dgv_SWDJ.Rows[e.RowIndex].Cells["trc_code"].Value;
                 Frm_FileSelect fileSelect = new Frm_FileSelect(rootId);
                 fileSelect.IsMoveMode = true;
                 fileSelect.BatchID    = BatchID;
                 fileSelect.DiskCode   = trcCode;
                 fileSelect.ShowDialog();
             }
             else
             {
                 XtraMessageBox.Show("当前光盘下尚无文件", "编辑失败");
             }
         }
     }
 }