protected void BtnSure_Click(object sender, EventArgs e) { if (inputStart.Value.ToString() == "") { //提示 Response.Write("<script>alert('【表名前缀】不能为空')</script>"); } else if (inputName.Value.ToString() == "") { //提示 Response.Write("<script>alert('【表名】不能为空')</script>"); } else if (txtarea.InnerHtml == "") { //提示 Response.Write("<script>alert('【中文字段部分】不能为空')</script>"); } else { string str = ""; if (AutoCodeCk.Checked == true)//自动编号 { string s = bc.GoToRemoveChar(txtarea.InnerHtml); //转成拼音首字母 str = bc.GoToSpace(Pinyin.GetInitials(s)).ToUpper(); str += "\r\n"; str += txtarea.InnerHtml + "_${RunTime.CurYear}${RunTime.CurMonth}${RunTime.CurDay}{$AutoNum$}"; } else//数据表 { str = GetTable(); } showText.InnerHtml = str; } }
// POST api/<controller> public string Post([FromBody] string value) { BasicClass bc = new BasicClass(); string str = ""; if (!string.IsNullOrEmpty(value)) { //转换大小写 str = bc.ConvertInitials(value); //去除空格 str = bc.GoToSpace(value); } return(str); }