private void DelTempAnnex(string strSenderCode) { MailManage mailManage = new MailManage(); DataTable tempAnnex = mailManage.GetTempAnnex(strSenderCode); for (int i = 0; i < tempAnnex.Rows.Count; i++) { if (!mailManage.DelTempAnnex(int.Parse(tempAnnex.Rows[i]["i_fj_id"].ToString()), true)) { this.RegisterClientScriptBlock("warn", "<SCRIPT languange=\"JavaScript\">alert('" + mailManage.MessageString + "');</SCRIPT>"); } } }
private bool DelTempAnnex(string strSenderCode) { MailManage mailManage = new MailManage(); DataTable tempAnnex = mailManage.GetTempAnnex(strSenderCode); for (int i = 0; i < tempAnnex.Rows.Count; i++) { if (!mailManage.DelTempAnnex(int.Parse(tempAnnex.Rows[i]["i_fj_id"].ToString()), true)) { return(false); } } return(true); }
protected void BtnDel_Click(object sender, EventArgs e) { if (this.LBoxAnnex.SelectedIndex > -1 && this.LBoxAnnex.Items.Count > 0) { int iAnnexID = int.Parse(this.LBoxAnnex.SelectedValue.ToString()); MailManage mailManage = new MailManage(); if (!mailManage.DelTempAnnex(iAnnexID, false)) { this.RegisterClientScriptBlock("warn", "<SCRIPT languange=\"JavaScript\">alert('" + mailManage.MessageString + "')</SCRIPT>"); return; } this.LBoxAnnex.Items.RemoveAt(this.LBoxAnnex.SelectedIndex); } }