Ejemplo n.º 1
0
        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;
            }
        }