private void ok_Click(object sender, EventArgs e) { bool flag = false; //AccountAdd aa = new AccountAdd(); Account acc = new Account(); float value; if (!maskedText_value.Value.ToString().Equals("")) { value = (float)maskedText_value.Value; } else { value = 0.00F; } flag = acc.writeOffAccount(true, dateTime_offDate.Text, Convert.ToInt32(combo_offType.SelectedValue.ToString()), value, richTextBox_memo.Text, globleId); //flag = aa.addAccount(false, text_asset.Text, text_eqname.Text, text_model.Text, text_specification.Text, Convert.ToInt32(combo_depart.SelectedValue.ToString()), text_weight.Text, text_brand.Text, text_manufacturer.Text, text_supplier.Text, dateTime_manu_date.Text, dateTime_produ_date.Text, dateTime_filing_date.Text, float.Parse(maskedText_value.Text), Convert.ToInt32(numeric_count.Value.ToString()), Convert.ToInt32(numeric_electromotor.Value.ToString()), float.Parse(maskedText_power.Text), Convert.ToInt32(combo_status.SelectedValue.ToString()), Convert.ToInt32(combo_eqType.SelectedValue.ToString()), text_address.Text, aa.getFileBytes(fileDialog_img.FileName), aa.getFileBytes(fileDialog_3d.FileName)); //flag = aa.addAccount(false, text_asset.Text, text_eqname.Text, text_model.Text, text_specification.Text, Convert.ToInt32(combo_depart.SelectedValue.ToString()), text_weight.Text, text_brand.Text, text_manufacturer.Text, text_supplier.Text, dateTime_offDate.Text, dateTime_produ_date.Text, dateTime_filing_date.Text, value, count, electromotor, power, Convert.ToInt32(combo_status.SelectedValue.ToString()), Convert.ToInt32(combo_offType.SelectedValue.ToString()), text_address.Text, img, threeD); if (flag) { MessageBox.Show("销帐成功!"); this.DialogResult = DialogResult.OK; this.Close(); } else { MessageBox.Show("销帐失败,请检查网络连接!"); } }