public string getCustomerInfo(int?fId) { ftest c = (new dbDemoDataContext()).ftest.FirstOrDefault(t => t.fid == fId); if (c == null) { return("沒有任何資料"); } return(c.fName + "<br/>" + c.fPhone + " / " + c.fEmail); }
public ActionResult getCustomerInfoWithPic(int?fId) { ftest c = (new dbDemoDataContext()).ftest.FirstOrDefault(t => t.fid == fId); ViewBag.NameInfo = "沒有任何資料"; if (c != null) { ViewBag.NameInfo = c.fName; } return(View()); }
private void btnReport_Click(object sender, EventArgs e) { ftest test = new ftest(id); test.Show(); }