Esempio n. 1
0
 private void btnHtml_Click(object sender, EventArgs e)
 {
     GenerateHtml html = new GenerateHtml();
     string name = cboTable.SelectedItem.ToString();
     html.Name = name;
     //此处的url截取最后一个/后面的字符串,因为mvc路由设置了Area
     int lastIndex = txtUrl.Text.LastIndexOf('/');
     if(lastIndex>0)
     {
         html.Url = txtUrl.Text.Trim();
         html.QueryAndDownloadUrl = txtUrl.Text.Substring(lastIndex + 1);
     }
     else
     {
         html.Url = txtUrl.Text.Trim();
     }
     
     rtbIndex.Text = html.Index();
     rtbQueryForm.Text = html.QueryForm();
     txtAddForm.Text = html.AddForm();
     txtUpdateForm.Text = html.UpdateForm();
 }
Esempio n. 2
0
 private void btnHtml_Click(object sender, EventArgs e)
 {
     GenerateHtml html = new GenerateHtml();
     string name = cboTable.SelectedItem.ToString();
     html.Name = name;
     html.Url = txtUrl.Text.Trim();
     rtbIndex.Text = html.Index();
     rtbQueryForm.Text = html.QueryForm();
     txtAddForm.Text = html.AddForm();
     txtUpdateForm.Text = html.UpdateForm();
 }