Example #1
0
 private void dgv_SaleCompanyImage_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     if (dgv_SaleCompanyImage.Columns[e.ColumnIndex].Name == "_saleCompanyImage" && e.RowIndex >= 0)
     {
         OpenFileDialog openfile = new OpenFileDialog();
         openfile.Filter = "jpg图片|*.jpg";
         if (openfile.ShowDialog() == DialogResult.OK && openfile.FileName != "")
         {
             string imageName = "express_" + dgv_SaleCompanyImage.CurrentRow.Cells["_saleCompanyID"].Value.ToString() + ".jpg";
             dgv_SaleCompanyImage.CurrentCell.Value = imageName;
             PrintDatas.UploadFile(openfile.FileName, imageName);
         }
     }
 }
Example #2
0
 private void dgv_PictureGroup_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     if (dgv_PictureGroup.Columns[e.ColumnIndex].Name == "_pictureName" && e.RowIndex >= 0)
     {
         OpenFileDialog openfile = new OpenFileDialog();
         openfile.Filter = "jpg图片|*.jpg";
         if (openfile.ShowDialog() == DialogResult.OK && openfile.FileName != "")
         {
             string imageName = dgv_PictureGroup.CurrentRow.Cells["_locationID"].FormattedValue.ToString()
                                + "_" + dgv_PictureGroup.CurrentRow.Cells["_groupID"].FormattedValue.ToString() + ".jpg";
             dgv_PictureGroup.CurrentCell.Value = imageName;
             PrintDatas.UploadFile(openfile.FileName, imageName);
         }
     }
 }