コード例 #1
0
        public void Initialize_Page()
        {
            FromDateTxt.Text = DateTime.Now.Year + "-" + DateTime.Now.Month + "-" + DateTime.Now.Day;
            ToDateTxt.Text   = DateTime.Now.Year + "-" + DateTime.Now.Month + "-" + DateTime.Now.Day;
            _SubAccountList  = db.SubAccount.ToList();
            _CarList         = db.Cars.ToList();

            TransportGrd.DataSource = null;
            TransportGrd.DataBind();
        }
コード例 #2
0
 protected void Button3_Click(object sender, EventArgs e)
 {
     Response.Clear();
     Response.Buffer = true;
     Response.AddHeader("content-disposition", "attachment;filename=كارتة صنف.xls");
     Response.Charset     = "";
     Response.ContentType = "application/vnd.ms-excel";
     {
         using (StringWriter sw = new StringWriter())
         {
             HtmlTextWriter hw = new HtmlTextWriter(sw);
             TransportGrd.RenderControl(hw);
             string style = "<style> .textmode { } </style>";
             Response.Write(style);
             Response.Output.Write(sw.ToString());
             Response.Flush();
             Response.End();
         }
     }
 }
コード例 #3
0
 protected void SaerchBtn_Click(object sender, EventArgs e)
 {
     TransportGrd.DataSource = TransportCommanDateSearch(FromDateTxt.Text, ToDateTxt.Text);
     TransportGrd.DataBind();
 }