示例#1
0
    protected void btnDel_Click(object sender, EventArgs e)
    {
        IntendanceMasterAction    intendanceMasterAction    = new IntendanceMasterAction();
        IntendancePhotoListAction intendancePhotoListAction = new IntendancePhotoListAction();
        DataTable photoInfoList = intendancePhotoListAction.GetPhotoInfoList(this.hdnIntendanceGuid.Value);
        string    text;

        if (photoInfoList.Rows.Count > 0)
        {
            for (int i = 0; i < photoInfoList.Rows.Count; i++)
            {
                MakeThumbnail makeThumbnail = new MakeThumbnail();
                if (makeThumbnail.DelThumbnai(photoInfoList.Rows[i]["NoteId"].ToString()))
                {
                }
            }
            if (intendancePhotoListAction.ClearPhotosList(this.hdnIntendanceGuid.Value) > 0)
            {
                text = "1";
            }
            else
            {
                text = "删除失败";
            }
        }
        else
        {
            text = "1";
        }
        if (!(text == "1"))
        {
            this.js.Text = "alert('" + text + "!');";
            return;
        }
        if (intendanceMasterAction.Del(this.hdnIntendanceGuid.Value) > 0)
        {
            this.js.Text = "alert('删除成功!');";
            this.DataBindToPage("");
            return;
        }
        this.js.Text = "alert('删除失败!');";
    }