strsql = getsql.UpdateSql(this, strTable, fidd);//调用方法 /**//// <summary> /// 新报合同文件 /// </summary> /// <param name="ThisPage">页面属性</param> /// <param name="strTable">插入表</param> /// <param name="fbaseid">企业ID号</param> /// <returns>返回字符串</returns> public string InsertSql(Page ThisPage, string strTable,int fbaseid) ...{ Web_Easy_TextBox.EasyTextBox objTextBox = new Web_Easy_TextBox.EasyTextBox(); EasyDropDown.Web_EasyDropDown objDropDown = new EasyDropDown.Web_EasyDropDown(); strSql = "insert into " + strTable + " (FHTXZ,FBaseID,FJSPass,FGSPass,FUpdate,FParentID,FUpdateType,"; strSqlValues = " values ('1','"+fbaseid +"','0','0','"+DateTime.Now.ToShortDateString()+"','0','1',"; //循环页面和页面中的容器,查找Web_Easy_TextBox.EasyTextBox控件,以便组合 foreach (Control MainContral in ThisPage.Controls) ...{ foreach (Control objControl in MainContral.Controls) ...{ if (objControl.GetType().ToString() == "Web_Easy_TextBox.EasyTextBox") ...{ objTextBox = (Web_Easy_TextBox.EasyTextBox)objControl; if (objTextBox.PlanOfDBFileType(true) == false) ...{ return ""; } if (objTextBox.DBFileType == Web_Easy_TextBox.DBFilesType.DbText) ...{ strSql = strSql + objTextBox.DbFiledName + ","; strSqlValues = strSqlValues + "'" + objTextBox.TextBoxText + "',"; } else ...{ strSql = strSql + objTextBox.DbFiledName + ","; strSqlValues = strSqlValues + "'" + objTextBox.TextBoxText + "',"; } } if (objControl.GetType().ToString() == "EasyDropDown.Web_EasyDropDown") ...{ objDropDown = (EasyDropDown.Web_EasyDropDown)objControl; if (objDropDown.DBFileType == EasyDropDown.DBFilesType.DbText) ...{ strSql = strSql + objDropDown.DbFiledName + ","; strSqlValues = strSqlValues + "'" + objDropDown.SelectedValue + "',"; } else ...{ strSql = strSql + objDropDown.DbFiledName + ","; strSqlValues = strSqlValues + "'" + objDropDown.SelectedValue + "',"; } } } } strSql = strSql.Substring(0, strSql.Length - 1) + ")"; strSqlValues = strSqlValues.Substring(0, strSqlValues.Length - 1) + ")"; SourceString = strSql + strSqlValues; return SourceString; }