/// <summary> /// 将表单中个数据列的数据写入明细记录表中,便于后期统计 /// </summary> public void GetDetailsData() { ZWL.BLL.ERPNWorkToDo MyModel = new ZWL.BLL.ERPNWorkToDo(); MyModel.GetModel(int.Parse(Request.QueryString["ID"].ToString())); //获取当前表单对应的工作数据列 string[] FormItemList = ZWL.DBUtility.DbHelperSQL.GetSHSL("select top 1 ItemsList from ERPNForm where ID=" + MyModel.FormID.ToString()).Split('|'); for (int i = 0; i < FormItemList.Length; i++) { if (FormItemList[i].Trim().Length > 0) { try { ZWL.BLL.ERPNWorkDetails Model = new ZWL.BLL.ERPNWorkDetails(); Model.WorkID = int.Parse(Request.QueryString["ID"].ToString()); Model.ItemsNameCN = FormItemList[i].Split('_')[1]; Model.ItemsNameEn = FormItemList[i].Split('_')[0]; Model.ItemsValue = Request.Form[FormItemList[i].Split('_')[0]].ToString(); Model.Add(); } catch { } } } }