public string Update(string json, string columns, string clientInf)
        {
            Dictionary <string, string> resultDic = new Dictionary <string, string>();

            resultDic["result"]  = "";
            resultDic["message"] = "";
            try
            {
                sara.dd.ldsw.model.tbl_ldbm_sbfz model = Eva.Library.Format.FormatEntityTool.FormatJsonToModel <sara.dd.ldsw.model.tbl_ldbm_sbfz>(json);
                model.sys_lasteditdate = DateTime.Now;
                columns              = FormatColumns(columns).Replace("^", ",");
                resultDic["result"]  = "true";
                resultDic["message"] = _idal_tbl_ldbm_sbfz.Update(model, columns, null);

                NewLog("数据更新成功,更新的数据为:json:" + json + ",columns:" + columns, "sql_update", clientInf);
            }
            catch (Exception ex)
            {
                resultDic["result"]  = "false";
                resultDic["message"] = Eva.Library.Format.FormatTextTool.ErrorMessageFormat(ex.Message + ex.StackTrace);

                NewLog("数据更新失败,更新的数据为:json:" + json + ",columns:" + columns + ",异常信息:" + Eva.Library.Format.FormatTextTool.ErrorMessageFormat(ex.Message + ex.StackTrace), "sql_update", clientInf);
            }
            return(Eva.Library.Format.FormatEntityTool.FormatDicToJson(resultDic));
        }
        public string Add(string json, string clientInf)
        {
            Dictionary <string, string> resultDic = new Dictionary <string, string>();

            resultDic["result"]  = "";
            resultDic["message"] = "";
            try
            {
                sara.dd.ldsw.model.tbl_ldbm_sbfz model = Eva.Library.Format.FormatEntityTool.FormatJsonToModel <sara.dd.ldsw.model.tbl_ldbm_sbfz>(json);
                model.sys_creatdate    = DateTime.Now;
                model.sys_lasteditdate = DateTime.Now;
                resultDic["result"]    = "true";
                resultDic["message"]   = _idal_tbl_ldbm_sbfz.Add(model, null);

                NewLog("数据创建成功,创建的数据为:" + json, "sql_insert", clientInf);
            }
            catch (Exception ex)
            {
                resultDic["result"]  = "false";
                resultDic["message"] = Eva.Library.Format.FormatTextTool.ErrorMessageFormat(ex.Message + ex.StackTrace);
                NewLog("数据创建失败,创建的数据为:" + json + ",异常信息:" + Eva.Library.Format.FormatTextTool.ErrorMessageFormat(ex.Message + ex.StackTrace), "sql_insert", clientInf);
            }
            return(Eva.Library.Format.FormatEntityTool.FormatDicToJson(resultDic));
        }
Beispiel #3
0
        /// <summary>
        /// 重写更新updatepaper
        /// </summary>
        /// <param name="json"></param>
        /// <param name="columns"></param>
        /// <param name="clientInf"></param>
        /// <returns></returns>
        public string Update(sara.dd.ldsw.model.tbl_ldbm_sbfz model, string columns, Eva.Library.Data.AccessDataTrans.IAccessDataTrans t)
        {
            String[]               columnsArray  = columns.Split(',');
            List <string>          columsList    = new List <string>(columnsArray);
            List <OracleParameter> parameterList = new List <OracleParameter>();
            OracleParameter        parameter     = null;

            #region sqlString
            StringBuilder strSql     = new StringBuilder();
            StringBuilder strSql_use = new StringBuilder();
            strSql.Append("update tbl_ldbm_sbfz set ");
            strSql_use.Append("update tbl_ldbm_sbfz set ");
            if (Eva.Library.Configuration.ConfigurationManager.AppSettings["SqlEditMode"].ToString() == "parameter")
            {
            }
            else //如果是sql形式的话,则进行textReturn
            {
                model = Eva.Library.Format.FormatTextTool.ModelFormat(model);
            }


            if (model.sys_orderid != null && columsList.Contains("sys_orderid"))
            {
                strSql.Append("sys_orderid='" + (model.sys_orderid) + "',");
                strSql_use.Append("sys_orderid=:sys_orderid,");
                parameter       = new OracleParameter(":sys_orderid", OracleType.VarChar);
                parameter.Value = model.sys_orderid;
                parameterList.Add(parameter);
            }

            if (model.sys_creatuserid != null && columsList.Contains("sys_creatuserid"))
            {
                strSql.Append("sys_creatuserid='" + (model.sys_creatuserid) + "',");
                strSql_use.Append("sys_creatuserid=:sys_creatuserid,");
                parameter       = new OracleParameter(":sys_creatuserid", OracleType.VarChar);
                parameter.Value = model.sys_creatuserid;
                parameterList.Add(parameter);
            }

            if (model.sys_creatusername != null && columsList.Contains("sys_creatusername"))
            {
                strSql.Append("sys_creatusername='******',");
                strSql_use.Append("sys_creatusername=:sys_creatusername,");
                parameter       = new OracleParameter(":sys_creatusername", OracleType.VarChar);
                parameter.Value = model.sys_creatusername;
                parameterList.Add(parameter);
            }

            if (model.sys_creatdate != null && columsList.Contains("sys_creatdate"))
            {
                strSql.Append("sys_creatdate=to_date('" + model.sys_creatdate.ToString("yyyy-MM-dd HH:mm:ss") + "','yyyy-MM-dd hh24:mi:ss'),");
                strSql_use.Append("sys_creatdate=:sys_creatdate,");
                parameter       = new OracleParameter(":sys_creatdate", OracleType.DateTime);
                parameter.Value = model.sys_creatdate;
                parameterList.Add(parameter);
            }

            if (model.sys_lastedituserid != null && columsList.Contains("sys_lastedituserid"))
            {
                strSql.Append("sys_lastedituserid='" + (model.sys_lastedituserid) + "',");
                strSql_use.Append("sys_lastedituserid=:sys_lastedituserid,");
                parameter       = new OracleParameter(":sys_lastedituserid", OracleType.VarChar);
                parameter.Value = model.sys_lastedituserid;
                parameterList.Add(parameter);
            }

            if (model.sys_lasteditusername != null && columsList.Contains("sys_lasteditusername"))
            {
                strSql.Append("sys_lasteditusername='******',");
                strSql_use.Append("sys_lasteditusername=:sys_lasteditusername,");
                parameter       = new OracleParameter(":sys_lasteditusername", OracleType.VarChar);
                parameter.Value = model.sys_lasteditusername;
                parameterList.Add(parameter);
            }

            if (model.sys_lasteditdate != null && columsList.Contains("sys_lasteditdate"))
            {
                strSql.Append("sys_lasteditdate=to_date('" + model.sys_lasteditdate.ToString("yyyy-MM-dd HH:mm:ss") + "','yyyy-MM-dd hh24:mi:ss'),");
                strSql_use.Append("sys_lasteditdate=:sys_lasteditdate,");
                parameter       = new OracleParameter(":sys_lasteditdate", OracleType.DateTime);
                parameter.Value = model.sys_lasteditdate;
                parameterList.Add(parameter);
            }

            if (model.sys_deluserid != null && columsList.Contains("sys_deluserid"))
            {
                strSql.Append("sys_deluserid='" + (model.sys_deluserid) + "',");
                strSql_use.Append("sys_deluserid=:sys_deluserid,");
                parameter       = new OracleParameter(":sys_deluserid", OracleType.VarChar);
                parameter.Value = model.sys_deluserid;
                parameterList.Add(parameter);
            }

            if (model.sys_delusername != null && columsList.Contains("sys_delusername"))
            {
                strSql.Append("sys_delusername='******',");
                strSql_use.Append("sys_delusername=:sys_delusername,");
                parameter       = new OracleParameter(":sys_delusername", OracleType.VarChar);
                parameter.Value = model.sys_delusername;
                parameterList.Add(parameter);
            }

            if (model.sys_deldate != null && columsList.Contains("sys_deldate"))
            {
                strSql.Append("sys_deldate=to_date('" + model.sys_deldate.ToString("yyyy-MM-dd HH:mm:ss") + "','yyyy-MM-dd hh24:mi:ss'),");
                strSql_use.Append("sys_deldate=:sys_deldate,");
                parameter       = new OracleParameter(":sys_deldate", OracleType.DateTime);
                parameter.Value = model.sys_deldate;
                parameterList.Add(parameter);
            }

            if (model.sys_delflag != null && columsList.Contains("sys_delflag"))
            {
                strSql.Append("sys_delflag='" + (model.sys_delflag) + "',");
                strSql_use.Append("sys_delflag=:sys_delflag,");
                parameter       = new OracleParameter(":sys_delflag", OracleType.VarChar);
                parameter.Value = model.sys_delflag;
                parameterList.Add(parameter);
            }

            if (model.f_value1 != null && columsList.Contains("f_value1"))
            {
                strSql.Append("f_value1='" + (model.f_value1) + "',");
                strSql_use.Append("f_value1=:f_value1,");
                parameter       = new OracleParameter(":f_value1", OracleType.VarChar);
                parameter.Value = model.f_value1;
                parameterList.Add(parameter);
            }

            if (model.f_value2 != null && columsList.Contains("f_value2"))
            {
                strSql.Append("f_value2='" + (model.f_value2) + "',");
                strSql_use.Append("f_value2=:f_value2,");
                parameter       = new OracleParameter(":f_value2", OracleType.VarChar);
                parameter.Value = model.f_value2;
                parameterList.Add(parameter);
            }

            if (model.f_value3 != null && columsList.Contains("f_value3"))
            {
                strSql.Append("f_value3='" + (model.f_value3) + "',");
                strSql_use.Append("f_value3=:f_value3,");
                parameter       = new OracleParameter(":f_value3", OracleType.VarChar);
                parameter.Value = model.f_value3;
                parameterList.Add(parameter);
            }

            if (model.f_value4 != null && columsList.Contains("f_value4"))
            {
                strSql.Append("f_value4='" + (model.f_value4) + "',");
                strSql_use.Append("f_value4=:f_value4,");
                parameter       = new OracleParameter(":f_value4", OracleType.VarChar);
                parameter.Value = model.f_value4;
                parameterList.Add(parameter);
            }

            if (model.f_value5 != null && columsList.Contains("f_value5"))
            {
                strSql.Append("f_value5='" + (model.f_value5) + "',");
                strSql_use.Append("f_value5=:f_value5,");
                parameter       = new OracleParameter(":f_value5", OracleType.VarChar);
                parameter.Value = model.f_value5;
                parameterList.Add(parameter);
            }

            if (model.f_value6 != null && columsList.Contains("f_value6"))
            {
                strSql.Append("f_value6='" + (model.f_value6) + "',");
                strSql_use.Append("f_value6=:f_value6,");
                parameter       = new OracleParameter(":f_value6", OracleType.VarChar);
                parameter.Value = model.f_value6;
                parameterList.Add(parameter);
            }

            if (model.f_value7 != null && columsList.Contains("f_value7"))
            {
                strSql.Append("f_value7='" + (model.f_value7) + "',");
                strSql_use.Append("f_value7=:f_value7,");
                parameter       = new OracleParameter(":f_value7", OracleType.VarChar);
                parameter.Value = model.f_value7;
                parameterList.Add(parameter);
            }

            if (model.f_value8 != null && columsList.Contains("f_value8"))
            {
                strSql.Append("f_value8='" + (model.f_value8) + "',");
                strSql_use.Append("f_value8=:f_value8,");
                parameter       = new OracleParameter(":f_value8", OracleType.VarChar);
                parameter.Value = model.f_value8;
                parameterList.Add(parameter);
            }

            if (model.f_value9 != null && columsList.Contains("f_value9"))
            {
                strSql.Append("f_value9='" + (model.f_value9) + "',");
                strSql_use.Append("f_value9=:f_value9,");
                parameter       = new OracleParameter(":f_value9", OracleType.VarChar);
                parameter.Value = model.f_value9;
                parameterList.Add(parameter);
            }

            if (model.f_value10 != null && columsList.Contains("f_value10"))
            {
                strSql.Append("f_value10='" + (model.f_value10) + "',");
                strSql_use.Append("f_value10=:f_value10,");
                parameter       = new OracleParameter(":f_value10", OracleType.VarChar);
                parameter.Value = model.f_value10;
                parameterList.Add(parameter);
            }

            if (model.f_fzmc != null && columsList.Contains("f_fzmc"))
            {
                strSql.Append("f_fzmc='" + (model.f_fzmc) + "',");
                strSql_use.Append("f_fzmc=:f_fzmc,");
                parameter       = new OracleParameter(":f_fzmc", OracleType.VarChar);
                parameter.Value = model.f_fzmc;
                parameterList.Add(parameter);
            }

            if (model.f_fzbm != null && columsList.Contains("f_fzbm"))
            {
                strSql.Append("f_fzbm='" + (model.f_fzbm) + "',");
                strSql_use.Append("f_fzbm=:f_fzbm,");
                parameter       = new OracleParameter(":f_fzbm", OracleType.VarChar);
                parameter.Value = model.f_fzbm;
                parameterList.Add(parameter);
            }

            if (model.f_bz != null && columsList.Contains("f_bz"))
            {
                strSql.Append("f_bz='" + (model.f_bz) + "',");
                strSql_use.Append("f_bz=:f_bz,");
                parameter       = new OracleParameter(":f_bz", OracleType.VarChar);
                parameter.Value = model.f_bz;
                parameterList.Add(parameter);
            }

            if (model.f_zt != null && columsList.Contains("f_zt"))
            {
                strSql.Append("f_zt='" + (model.f_zt) + "',");
                strSql_use.Append("f_zt=:f_zt,");
                parameter       = new OracleParameter(":f_zt", OracleType.VarChar);
                parameter.Value = model.f_zt;
                parameterList.Add(parameter);
            }

            if (model.f_ztid != null && columsList.Contains("f_ztid"))
            {
                strSql.Append("f_ztid='" + (model.f_ztid) + "',");
                strSql_use.Append("f_ztid=:f_ztid,");
                parameter       = new OracleParameter(":f_ztid", OracleType.VarChar);
                parameter.Value = model.f_ztid;
                parameterList.Add(parameter);
            }

            int n = strSql.ToString().LastIndexOf(",");
            strSql.Remove(n, 1);
            strSql.Append(" where sys_id='" + model.sys_id + "'");

            n = strSql_use.ToString().LastIndexOf(",");
            strSql_use.Remove(n, 1);
            strSql_use.Append(" where sys_id='" + model.sys_id + "'");
            #endregion
            int columscount = 0;
            if (Eva.Library.Configuration.ConfigurationManager.AppSettings["SqlEditMode"].ToString() == "parameter")
            {
                #region parameter
                if (parameterList.Count > 0)
                {
                    if (t == null)
                    {
                        columscount = _iAccessData.ExecuteSql(strSql_use.ToString(), parameterList.ToArray());
                    }
                    else
                    {
                        columscount = t.ExecuteSql(strSql_use.ToString(), parameterList.ToArray());
                    }
                }
                #endregion
            }
            else
            {
                #region sql
                if (t == null)
                {
                    columscount = _iAccessData.ExecuteSql(strSql.ToString());
                }
                else
                {
                    columscount = t.ExecuteSql(strSql.ToString());
                }
                #endregion
            }
            return(columscount.ToString());
        }
Beispiel #4
0
        /// <summary>
        /// 重写添加addlayerconfig
        /// </summary>
        /// <param name="json"></param>
        /// <param name="clientInf"></param>
        /// <returns></returns>
        public string Add(sara.dd.ldsw.model.tbl_ldbm_sbfz model, Eva.Library.Data.AccessDataTrans.IAccessDataTrans t)
        {
            StringBuilder strSql     = new StringBuilder();
            StringBuilder strSql_use = new StringBuilder();
            StringBuilder strSql1    = new StringBuilder();
            StringBuilder strSql2    = new StringBuilder();
            StringBuilder strSql3    = new StringBuilder();

            if (Eva.Library.Configuration.ConfigurationManager.AppSettings["SqlEditMode"].ToString() == "parameter")
            {
            }
            else //如果是sql形式的话,则进行textFormat
            {
                model = Eva.Library.Format.FormatTextTool.ModelFormat(model);
            }
            List <OracleParameter> parameterList = new List <OracleParameter>();
            OracleParameter        parameter     = null;

            string sid = "";

            if (model.sys_id <= 0)
            {
                if (t == null)
                {
                    sid = GetMaxId(null).ToString();
                }
                else
                {
                    sid = GetMaxId(t).ToString();
                }
                model.sys_id = int.Parse(sid);
            }
            else
            {
                sid = model.sys_id.ToString();
            }

            #region sqlString
            strSql1.Append("sys_id,");
            strSql2.Append("'" + sid + "',");
            strSql3.Append(":sys_id,");
            parameter       = new OracleParameter(":sys_id", OracleType.Number);
            parameter.Value = sid;
            parameterList.Add(parameter);

            if (model.sys_orderid != null)
            {
                strSql1.Append("sys_orderid,");
                strSql2.Append("'" + (model.sys_orderid) + "',");
                strSql3.Append(":sys_orderid,");
                parameter       = new OracleParameter(":sys_orderid", OracleType.VarChar);
                parameter.Value = model.sys_orderid;
                parameterList.Add(parameter);
            }

            if (model.sys_creatuserid != null)
            {
                strSql1.Append("sys_creatuserid,");
                strSql2.Append("'" + (model.sys_creatuserid) + "',");
                strSql3.Append(":sys_creatuserid,");
                parameter       = new OracleParameter(":sys_creatuserid", OracleType.VarChar);
                parameter.Value = model.sys_creatuserid;
                parameterList.Add(parameter);
            }

            if (model.sys_creatusername != null)
            {
                strSql1.Append("sys_creatusername,");
                strSql2.Append("'" + (model.sys_creatusername) + "',");
                strSql3.Append(":sys_creatusername,");
                parameter       = new OracleParameter(":sys_creatusername", OracleType.VarChar);
                parameter.Value = model.sys_creatusername;
                parameterList.Add(parameter);
            }

            if (model.sys_creatdate != null)
            {
                strSql1.Append("sys_creatdate,");
                strSql2.Append("to_date('" + model.sys_creatdate.ToString("yyyy-MM-dd HH:mm:ss") + "','yyyy-MM-dd hh24:mi:ss'),");
                strSql3.Append(":sys_creatdate,");
                parameter       = new OracleParameter(":sys_creatdate", OracleType.DateTime);
                parameter.Value = model.sys_creatdate;
                parameterList.Add(parameter);
            }

            if (model.sys_lastedituserid != null)
            {
                strSql1.Append("sys_lastedituserid,");
                strSql2.Append("'" + (model.sys_lastedituserid) + "',");
                strSql3.Append(":sys_lastedituserid,");
                parameter       = new OracleParameter(":sys_lastedituserid", OracleType.VarChar);
                parameter.Value = model.sys_lastedituserid;
                parameterList.Add(parameter);
            }

            if (model.sys_lasteditusername != null)
            {
                strSql1.Append("sys_lasteditusername,");
                strSql2.Append("'" + (model.sys_lasteditusername) + "',");
                strSql3.Append(":sys_lasteditusername,");
                parameter       = new OracleParameter(":sys_lasteditusername", OracleType.VarChar);
                parameter.Value = model.sys_lasteditusername;
                parameterList.Add(parameter);
            }

            if (model.sys_lasteditdate != null)
            {
                strSql1.Append("sys_lasteditdate,");
                strSql2.Append("to_date('" + model.sys_lasteditdate.ToString("yyyy-MM-dd HH:mm:ss") + "','yyyy-MM-dd hh24:mi:ss'),");
                strSql3.Append(":sys_lasteditdate,");
                parameter       = new OracleParameter(":sys_lasteditdate", OracleType.DateTime);
                parameter.Value = model.sys_lasteditdate;
                parameterList.Add(parameter);
            }

            if (model.sys_deluserid != null)
            {
                strSql1.Append("sys_deluserid,");
                strSql2.Append("'" + (model.sys_deluserid) + "',");
                strSql3.Append(":sys_deluserid,");
                parameter       = new OracleParameter(":sys_deluserid", OracleType.VarChar);
                parameter.Value = model.sys_deluserid;
                parameterList.Add(parameter);
            }

            if (model.sys_delusername != null)
            {
                strSql1.Append("sys_delusername,");
                strSql2.Append("'" + (model.sys_delusername) + "',");
                strSql3.Append(":sys_delusername,");
                parameter       = new OracleParameter(":sys_delusername", OracleType.VarChar);
                parameter.Value = model.sys_delusername;
                parameterList.Add(parameter);
            }

            if (model.sys_deldate != null)
            {
                strSql1.Append("sys_deldate,");
                strSql2.Append("to_date('" + model.sys_deldate.ToString("yyyy-MM-dd HH:mm:ss") + "','yyyy-MM-dd hh24:mi:ss'),");
                strSql3.Append(":sys_deldate,");
                parameter       = new OracleParameter(":sys_deldate", OracleType.DateTime);
                parameter.Value = model.sys_deldate;
                parameterList.Add(parameter);
            }

            if (model.sys_delflag != null)
            {
                strSql1.Append("sys_delflag,");
                strSql2.Append("'" + (model.sys_delflag) + "',");
                strSql3.Append(":sys_delflag,");
                parameter       = new OracleParameter(":sys_delflag", OracleType.VarChar);
                parameter.Value = model.sys_delflag;
                parameterList.Add(parameter);
            }

            if (model.f_value1 != null)
            {
                strSql1.Append("f_value1,");
                strSql2.Append("'" + (model.f_value1) + "',");
                strSql3.Append(":f_value1,");
                parameter       = new OracleParameter(":f_value1", OracleType.VarChar);
                parameter.Value = model.f_value1;
                parameterList.Add(parameter);
            }

            if (model.f_value2 != null)
            {
                strSql1.Append("f_value2,");
                strSql2.Append("'" + (model.f_value2) + "',");
                strSql3.Append(":f_value2,");
                parameter       = new OracleParameter(":f_value2", OracleType.VarChar);
                parameter.Value = model.f_value2;
                parameterList.Add(parameter);
            }

            if (model.f_value3 != null)
            {
                strSql1.Append("f_value3,");
                strSql2.Append("'" + (model.f_value3) + "',");
                strSql3.Append(":f_value3,");
                parameter       = new OracleParameter(":f_value3", OracleType.VarChar);
                parameter.Value = model.f_value3;
                parameterList.Add(parameter);
            }

            if (model.f_value4 != null)
            {
                strSql1.Append("f_value4,");
                strSql2.Append("'" + (model.f_value4) + "',");
                strSql3.Append(":f_value4,");
                parameter       = new OracleParameter(":f_value4", OracleType.VarChar);
                parameter.Value = model.f_value4;
                parameterList.Add(parameter);
            }

            if (model.f_value5 != null)
            {
                strSql1.Append("f_value5,");
                strSql2.Append("'" + (model.f_value5) + "',");
                strSql3.Append(":f_value5,");
                parameter       = new OracleParameter(":f_value5", OracleType.VarChar);
                parameter.Value = model.f_value5;
                parameterList.Add(parameter);
            }

            if (model.f_value6 != null)
            {
                strSql1.Append("f_value6,");
                strSql2.Append("'" + (model.f_value6) + "',");
                strSql3.Append(":f_value6,");
                parameter       = new OracleParameter(":f_value6", OracleType.VarChar);
                parameter.Value = model.f_value6;
                parameterList.Add(parameter);
            }

            if (model.f_value7 != null)
            {
                strSql1.Append("f_value7,");
                strSql2.Append("'" + (model.f_value7) + "',");
                strSql3.Append(":f_value7,");
                parameter       = new OracleParameter(":f_value7", OracleType.VarChar);
                parameter.Value = model.f_value7;
                parameterList.Add(parameter);
            }

            if (model.f_value8 != null)
            {
                strSql1.Append("f_value8,");
                strSql2.Append("'" + (model.f_value8) + "',");
                strSql3.Append(":f_value8,");
                parameter       = new OracleParameter(":f_value8", OracleType.VarChar);
                parameter.Value = model.f_value8;
                parameterList.Add(parameter);
            }

            if (model.f_value9 != null)
            {
                strSql1.Append("f_value9,");
                strSql2.Append("'" + (model.f_value9) + "',");
                strSql3.Append(":f_value9,");
                parameter       = new OracleParameter(":f_value9", OracleType.VarChar);
                parameter.Value = model.f_value9;
                parameterList.Add(parameter);
            }

            if (model.f_value10 != null)
            {
                strSql1.Append("f_value10,");
                strSql2.Append("'" + (model.f_value10) + "',");
                strSql3.Append(":f_value10,");
                parameter       = new OracleParameter(":f_value10", OracleType.VarChar);
                parameter.Value = model.f_value10;
                parameterList.Add(parameter);
            }

            if (model.f_fzmc != null)
            {
                strSql1.Append("f_fzmc,");
                strSql2.Append("'" + (model.f_fzmc) + "',");
                strSql3.Append(":f_fzmc,");
                parameter       = new OracleParameter(":f_fzmc", OracleType.VarChar);
                parameter.Value = model.f_fzmc;
                parameterList.Add(parameter);
            }

            if (model.f_fzbm != null)
            {
                strSql1.Append("f_fzbm,");
                strSql2.Append("'" + (model.f_fzbm) + "',");
                strSql3.Append(":f_fzbm,");
                parameter       = new OracleParameter(":f_fzbm", OracleType.VarChar);
                parameter.Value = model.f_fzbm;
                parameterList.Add(parameter);
            }

            if (model.f_bz != null)
            {
                strSql1.Append("f_bz,");
                strSql2.Append("'" + (model.f_bz) + "',");
                strSql3.Append(":f_bz,");
                parameter       = new OracleParameter(":f_bz", OracleType.VarChar);
                parameter.Value = model.f_bz;
                parameterList.Add(parameter);
            }

            if (model.f_zt != null)
            {
                strSql1.Append("f_zt,");
                strSql2.Append("'" + (model.f_zt) + "',");
                strSql3.Append(":f_zt,");
                parameter       = new OracleParameter(":f_zt", OracleType.VarChar);
                parameter.Value = model.f_zt;
                parameterList.Add(parameter);
            }

            if (model.f_ztid != null)
            {
                strSql1.Append("f_ztid,");
                strSql2.Append("'" + (model.f_ztid) + "',");
                strSql3.Append(":f_ztid,");
                parameter       = new OracleParameter(":f_ztid", OracleType.VarChar);
                parameter.Value = model.f_ztid;
                parameterList.Add(parameter);
            }

            strSql.Append("insert into tbl_ldbm_sbfz(");
            strSql.Append(strSql1.ToString().Remove(strSql1.Length - 1));
            strSql.Append(")");
            strSql.Append(" values (");
            strSql.Append(strSql2.ToString().Remove(strSql2.Length - 1));
            strSql.Append(")");

            strSql_use.Append("insert into tbl_ldbm_sbfz(");
            strSql_use.Append(strSql1.ToString().Remove(strSql1.Length - 1));
            strSql_use.Append(")");
            strSql_use.Append(" values (");
            strSql_use.Append(strSql3.ToString().Remove(strSql3.Length - 1));
            strSql_use.Append(")");

            #endregion
            if (Eva.Library.Configuration.ConfigurationManager.AppSettings["SqlEditMode"].ToString() == "parameter")
            {
                #region parameter
                if (parameterList.Count > 0)
                {
                    if (t == null)
                    {
                        _iAccessData.ExecuteSql(strSql_use.ToString(), parameterList.ToArray());
                    }
                    else
                    {
                        t.ExecuteSql(strSql_use.ToString(), parameterList.ToArray());
                    }
                }
                #endregion
            }
            else
            {
                #region sql
                if (t == null)
                {
                    _iAccessData.ExecuteSql(strSql.ToString());
                }
                else
                {
                    t.ExecuteSql(strSql.ToString());
                }
                List <string>          paraStrList = new List <string>();
                List <OracleParameter> pList       = new List <OracleParameter>();
                OracleParameter        p           = null;



                if (paraStrList.Count > 0)
                {
                    string updateSqlString = " update tbl_ldbm_sbfz set " + string.Join(" , ", paraStrList.ToArray()) + " where sys_id = '" + sid + "' ";
                    if (pList.Count > 0)
                    {
                        if (t == null)
                        {
                            _iAccessData.ExecuteSql(updateSqlString, pList.ToArray());
                        }
                        else
                        {
                            t.ExecuteSql(updateSqlString, pList.ToArray());
                        }
                    }
                }
                #endregion
            }


            return(sid);
        }