public void Add(PD_PROJECT_ATTACH_YS_Model model)
 {
     StringBuilder builder = new StringBuilder();
     builder.Append("insert into PD_PROJECT_ATTACH_YS(");
     builder.Append("PD_PROJECT_CODE,PD_PROJECT_ATTACH_TYPE,PD_PROJECT_ATTACH_NAME,PD_PROJECT_ATTACH_NAME_SYSTEM)");
     builder.Append(" values (");
     builder.Append(":PD_PROJECT_CODE,:PD_PROJECT_ATTACH_TYPE,:PD_PROJECT_ATTACH_NAME,:PD_PROJECT_ATTACH_NAME_SYSTEM)");
     OracleParameter[] cmdParms = new OracleParameter[] { new OracleParameter(":PD_PROJECT_CODE", OracleType.VarChar, 30), new OracleParameter(":PD_PROJECT_ATTACH_TYPE", OracleType.VarChar, 50), new OracleParameter(":PD_PROJECT_ATTACH_NAME", OracleType.VarChar, 50), new OracleParameter(":PD_PROJECT_ATTACH_NAME_SYSTEM", OracleType.VarChar, 50) };
     cmdParms[0].Value = model.PD_PROJECT_CODE;
     cmdParms[1].Value = model.PD_PROJECT_ATTACH_TYPE;
     cmdParms[2].Value = model.PD_PROJECT_ATTACH_NAME;
     cmdParms[3].Value = model.PD_PROJECT_ATTACH_NAME_SYSTEM;
     DbHelperOra.ExecuteSql(builder.ToString(), cmdParms);
 }
 public List<PD_PROJECT_ATTACH_YS_Model> DataTableToList(DataTable dt)
 {
     List<PD_PROJECT_ATTACH_YS_Model> list = new List<PD_PROJECT_ATTACH_YS_Model>();
     int count = dt.Rows.Count;
     if (count > 0)
     {
         for (int i = 0; i < count; i++)
         {
             PD_PROJECT_ATTACH_YS_Model item = new PD_PROJECT_ATTACH_YS_Model();
             if (dt.Rows[i]["AUTO_NO"].ToString() != "")
             {
                 item.AUTO_NO = int.Parse(dt.Rows[i]["AUTO_NO"].ToString());
             }
             item.PD_PROJECT_CODE = dt.Rows[i]["PD_PROJECT_CODE"].ToString();
             item.PD_PROJECT_ATTACH_TYPE = dt.Rows[i]["PD_PROJECT_ATTACH_TYPE"].ToString();
             item.PD_PROJECT_ATTACH_NAME = dt.Rows[i]["PD_PROJECT_ATTACH_NAME"].ToString();
             item.PD_PROJECT_ATTACH_NAME_SYSTEM = dt.Rows[i]["PD_PROJECT_ATTACH_NAME_SYSTEM"].ToString();
             list.Add(item);
         }
     }
     return list;
 }
 private List<PD_PROJECT_ATTACH_YS_Model> GetAttach_SSModel(string PD_PROJECT_CODE)
 {
     List<PD_PROJECT_ATTACH_YS_Model> list = new List<PD_PROJECT_ATTACH_YS_Model>();
     if (base.Request.Form["table_xmyszl_PD_PROJECT_CODE"] != null)
     {
         string[] strArray = base.Request.Form["table_xmyszl_PD_PROJECT_CODE"].Split(new char[] { ',' });
         int length = strArray.Length;
         DataSet set = null;
         DataView defaultView = null;
         string s = base.Server.UrlDecode(this.FilePostCtr1.getFileName);
         if ((s != null) && (s.Trim() != ""))
         {
             set = new DataSet();
             XmlTextReader reader = new XmlTextReader(new StringReader(s));
             set.ReadXml(reader);
         }
         if ((set != null) && (set.Tables.Count > 0))
         {
             defaultView = set.Tables[0].DefaultView;
         }
         for (int i = 0; i < strArray.Length; i++)
         {
             PD_PROJECT_ATTACH_YS_Model item = new PD_PROJECT_ATTACH_YS_Model
             {
                 PD_PROJECT_CODE = strArray[i]
             };
             if (defaultView != null)
             {
                 defaultView.RowFilter = " tableID='table_xmyszl' and rowIndex=" + (i + 1);
                 if (defaultView.Count > 0)
                 {
                     item.PD_PROJECT_ATTACH_NAME = defaultView[0]["FileName"].ToString();
                     item.PD_PROJECT_ATTACH_NAME_SYSTEM = defaultView[0]["FileSysName"].ToString();
                 }
             }
             list.Add(item);
         }
     }
     return list;
 }
 public PD_PROJECT_ATTACH_YS_Model GetModel(int AUTO_NO)
 {
     StringBuilder builder = new StringBuilder();
     builder.Append("select AUTO_NO,PD_PROJECT_CODE,PD_PROJECT_ATTACH_TYPE,PD_PROJECT_ATTACH_NAME,PD_PROJECT_ATTACH_NAME_SYSTEM from PD_PROJECT_ATTACH_YS ");
     builder.Append(" where AUTO_NO=:AUTO_NO ");
     OracleParameter[] cmdParms = new OracleParameter[] { new OracleParameter(":AUTO_NO", OracleType.Number, 4) };
     cmdParms[0].Value = AUTO_NO;
     PD_PROJECT_ATTACH_YS_Model model = new PD_PROJECT_ATTACH_YS_Model();
     DataSet set = DbHelperOra.Query(builder.ToString(), cmdParms);
     if (set.Tables[0].Rows.Count <= 0)
     {
         return null;
     }
     if (set.Tables[0].Rows[0]["AUTO_NO"].ToString() != "")
     {
         model.AUTO_NO = int.Parse(set.Tables[0].Rows[0]["AUTO_NO"].ToString());
     }
     model.PD_PROJECT_CODE = set.Tables[0].Rows[0]["PD_PROJECT_CODE"].ToString();
     model.PD_PROJECT_ATTACH_TYPE = set.Tables[0].Rows[0]["PD_PROJECT_ATTACH_TYPE"].ToString();
     model.PD_PROJECT_ATTACH_NAME = set.Tables[0].Rows[0]["PD_PROJECT_ATTACH_NAME"].ToString();
     model.PD_PROJECT_ATTACH_NAME_SYSTEM = set.Tables[0].Rows[0]["PD_PROJECT_ATTACH_NAME_SYSTEM"].ToString();
     return model;
 }
 public bool Update(PD_PROJECT_ATTACH_YS_Model model)
 {
     StringBuilder builder = new StringBuilder();
     builder.Append("update PD_PROJECT_ATTACH_YS set ");
     builder.Append("PD_PROJECT_CODE=:PD_PROJECT_CODE,");
     builder.Append("PD_PROJECT_ATTACH_TYPE=:PD_PROJECT_ATTACH_TYPE,");
     builder.Append("PD_PROJECT_ATTACH_NAME=:PD_PROJECT_ATTACH_NAME,");
     builder.Append("PD_PROJECT_ATTACH_NAME_SYSTEM=:PD_PROJECT_ATTACH_NAME_SYSTEM");
     builder.Append(" where AUTO_NO=:AUTO_NO ");
     OracleParameter[] cmdParms = new OracleParameter[] { new OracleParameter(":PD_PROJECT_CODE", OracleType.VarChar, 30), new OracleParameter(":PD_PROJECT_ATTACH_TYPE", OracleType.VarChar, 50), new OracleParameter(":PD_PROJECT_ATTACH_NAME", OracleType.VarChar, 50), new OracleParameter(":PD_PROJECT_ATTACH_NAME_SYSTEM", OracleType.VarChar, 50), new OracleParameter(":AUTO_NO", OracleType.Number, 4) };
     cmdParms[0].Value = model.PD_PROJECT_CODE;
     cmdParms[1].Value = model.PD_PROJECT_ATTACH_TYPE;
     cmdParms[2].Value = model.PD_PROJECT_ATTACH_NAME;
     cmdParms[3].Value = model.PD_PROJECT_ATTACH_NAME_SYSTEM;
     cmdParms[4].Value = model.AUTO_NO;
     return (DbHelperOra.ExecuteSql(builder.ToString(), cmdParms) > 0);
 }
 public void Add(PD_PROJECT_ATTACH_YS_Model model)
 {
     this.dal.Add(model);
 }
 public bool Update(PD_PROJECT_ATTACH_YS_Model model)
 {
     return this.dal.Update(model);
 }