//void dlService_GetAttachmentByBatchIDCompleted(object sender, Entity.CarWebService.GetAttachmentByBatchIDCompletedEventArgs e) //{ // if (e.Error == null && imgList == null) // { // imgList = e.Result; // if (e.Result != null) // { // int row = 0; // List<Control> cc = new List<Control>(); // foreach (Control cmain in panel1.Controls) // { // cc.Add(cmain); // } // CommonService.QuickSort<Control>(cc, "TabIndex"); // foreach (Control cmain in cc) // { // if (cmain is Panel) // { // if (row < e.Result.Rows.Count) // { // DataRow dr = e.Result.Rows[row]; // if (DBNull.Value != dr["ThumbnailIMG"]) // { // foreach (Control c in cmain.Controls) // { // if (c is PictureBox && ((PictureBox)c).Image == null) // { // Stream s = new MemoryStream(Convert.FromBase64String(dr["ThumbnailIMG"].ToString())); // ((PictureBox)c).Image = Image.FromStream(s); // ((PictureBox)c).Tag = dr["ID"]; // toolTip1.SetToolTip(c, "点击查看原图"); // } // else if (c is CheckBox) // { // CheckBox cb = (CheckBox)c; // cb.Text = dr["CreateTime"].ToString(); // } // } // } // row++; // } // } // } // } // } //} private void btn_Upload_Click(object sender, EventArgs e) { if (imgList != null && imgList.Rows.Count >= 12) { MessageBox.Show("您上传的图片数量过多,请删除无用图片后再进行上传!"); return; } frmUploadImg_Keep fui = new frmUploadImg_Keep(_shopCode, _carID); fui.ImgMangeWindowRefreshed += new EventHandler(fui_ImgMangeWindowRefreshed); fui.Show(); }