Beispiel #1
0
    private void GetMail()
    {
        string receiverid = Request.Cookies["id"].Value.ToString();
        string mailtype   = "开题材料";

        Fannie.Mail ml = new Fannie.Mail();
        DataTable   dt = new DataTable();
        DataSet     ds = ml.GetMail("2", receiverid, mailtype);
        DataColumn  dc = new DataColumn();

        dc.ColumnName = "DataNo";
        ds.Tables[0].Columns.Add(dc);
        for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
        {
            ds.Tables[0].Rows[i]["DataNo"] = (i + 1).ToString();
        }
        ReportList.DataKeyNames = new string[] { "MailNo" };
        ReportList.DataSource   = ds;
        ReportList.DataBind();
        dt = ds.Tables[0];
        if (dt.Rows.Count == 0)
        {
            Label1.Visible = true;
        }
        else
        {
            Label1.Visible = false;
        }
    }
Beispiel #2
0
    private void GetFileBind()
    {
        Fannie.Mail mail = new Fannie.Mail();
        DataSet     ds   = mail.GetMail("1", Request.Cookies["id"].Value.ToString(), "归档材料");
        DataColumn  dc   = new DataColumn();

        dc.ColumnName = "AID";
        ds.Tables[0].Columns.Add(dc);
        for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
        {
            ds.Tables[0].Rows[i]["AID"] = (i + 1).ToString();
        }
        gvDataFile.DataSource = ds;
        gvDataFile.DataBind();
    }