コード例 #1
0
 public List<SMZJ.Model.TB_QUOTA_DETAIL> DataTableToList(DataTable dt)
 {
     List<SMZJ.Model.TB_QUOTA_DETAIL> list = new List<SMZJ.Model.TB_QUOTA_DETAIL>();
     int count = dt.Rows.Count;
     if (count > 0)
     {
         for (int i = 0; i < count; i++)
         {
             SMZJ.Model.TB_QUOTA_DETAIL item = new SMZJ.Model.TB_QUOTA_DETAIL();
             if (dt.Rows[i]["AUTO_NO"].ToString() != "")
             {
                 item.AUTO_NO = int.Parse(dt.Rows[i]["AUTO_NO"].ToString());
             }
             item.PD_QUOTA_CODE = dt.Rows[i]["PD_QUOTA_CODE"].ToString();
             item.COMPANY_NAME = dt.Rows[i]["COMPANY_NAME"].ToString();
             item.FILE_NAME = dt.Rows[i]["FILE_NAME"].ToString();
             item.FILE_SYSNAME = dt.Rows[i]["FILE_SYSNAME"].ToString();
             item.COMPANY_CODE = dt.Rows[i]["COMPANY_CODE"].ToString();
             item.FILE_TYPE = dt.Rows[i]["FILE_TYPE"].ToString();
             list.Add(item);
         }
     }
     return list;
 }
コード例 #2
0
 private List<SMZJ.Model.TB_QUOTA_DETAIL> GetQUOTAModel(string PD_QUOTA_CODE)
 {
     List<SMZJ.Model.TB_QUOTA_DETAIL> list = new List<SMZJ.Model.TB_QUOTA_DETAIL>();
     if (base.Request.Form["table_xzxx_PD_QUOTA_CODE"] != null)
     {
         string[] strArray = base.Request.Form["table_xzxx_PD_QUOTA_CODE"].Split(new char[] { ',' });
         string[] strArray2 = base.Request.Form["PD_Company_NAME"].Split(new char[] { ',' });
         string[] strArray3 = base.Request.Form["table_xzxx_AUTO_NO"].Split(new char[] { ',' });
         string[] strArray4 = base.Request.Form["table_xzxx_PD_UP_MONEY"].Split(new char[] { ',' });
         string[] strArray5 = base.Request.Form["table_xzxx_PD_QUOTA_SERVERPK"].Split(new char[] { ',' });
         string[] strArray6 = base.Request.Form["table_xzxx_ISRECEIVE"].Split(new char[] { ',' });
         string[] strArray7 = base.Request.Form["table_xzxx_IF_SHOW"].Split(new char[] { ',' });
         string[] strArray8 = base.Request.Form["table_xzxx_ISHUIZHI"].Split(new char[] { ',' });
         string[] strArray9 = base.Request.Form["table_xzxx_RECEIVE_MAN"].Split(new char[] { ',' });
         string[] strArray10 = base.Request.Form["table_xzxx_HUIZHI_MAN"].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++)
         {
             SMZJ.Model.TB_QUOTA_DETAIL item = new SMZJ.Model.TB_QUOTA_DETAIL();
             if (PublicDal.PageValidate.IsNumber(strArray3[i]))
             {
                 item.AUTO_NO = int.Parse(strArray3[i]);
             }
             else
             {
                 item.AUTO_NO = 0M;
             }
             item.PD_QUOTA_CODE = PD_QUOTA_CODE;
             item.COMPANY_CODE = strArray2[i];
             item.PD_UP_MONEY = strArray4[i];
             item.PD_QUOTA_SERVERPK = strArray5[i];
             item.ISRECEIVE = strArray6[i];
             if (base.Request["UpdatePK"] == null)
             {
                 strArray7[i] = "1";
             }
             item.IF_SHOW = strArray7[i];
             item.ISHUIZHI = strArray8[i];
             item.RECEIVE_MAN = strArray9[i];
             item.HUIZHI_MAN = strArray10[i];
             if (defaultView != null)
             {
                 if ((this.ddlPD_QUOTA_IFUP.SelectedValue.Trim() != null) && (this.ddlPD_QUOTA_IFUP.SelectedValue.Trim() == "1"))
                 {
                     defaultView.RowFilter = " tableID='zxzb_bt' ";
                     if (defaultView.Count > 0)
                     {
                         item.FILE_NAME = defaultView[0]["FileName"].ToString();
                         item.FILE_SYSNAME = defaultView[0]["FileSysName"].ToString();
                     }
                 }
                 else
                 {
                     defaultView.RowFilter = " tableID='table_xzxx' and rowIndex=" + (i + 1);
                     if (defaultView.Count > 0)
                     {
                         item.FILE_NAME = defaultView[0]["FileName"].ToString();
                         item.FILE_SYSNAME = defaultView[0]["FileSysName"].ToString();
                     }
                 }
             }
             list.Add(item);
         }
     }
     return list;
 }
コード例 #3
0
 public SMZJ.Model.TB_QUOTA_DETAIL GetModel(string PD_QUOTA_CODE)
 {
     StringBuilder builder = new StringBuilder();
     builder.Append("SELECT  AUTO_NO, PD_QUOTA_CODE, COMPANY_NAME, FILE_NAME, FILE_SYSNAME, COMPANY_CODE, FILE_TYPE, PD_UP_MONEY, PD_QUOTA_SERVERPK, IF_SHOW,ISRECEIVE,ISHUIZHI,RECEIVE_MAN,HUIZHI_MAN,RECEIVE_MANNAME,HUIZHI_MANNAME ");
     builder.Append(" from View_QUOTA_DETAIL_GetList ");
     builder.Append(" where PD_QUOTA_CODE=:PD_QUOTA_CODE ");
     OracleParameter[] cmdParms = new OracleParameter[] { new OracleParameter(":PD_QUOTA_CODE", OracleType.VarChar, 50) };
     cmdParms[0].Value = PD_QUOTA_CODE;
     SMZJ.Model.TB_QUOTA_DETAIL tb_quota_detail = new SMZJ.Model.TB_QUOTA_DETAIL();
     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() != "")
     {
         tb_quota_detail.AUTO_NO = int.Parse(set.Tables[0].Rows[0]["AUTO_NO"].ToString());
     }
     tb_quota_detail.PD_QUOTA_CODE = set.Tables[0].Rows[0]["PD_QUOTA_CODE"].ToString();
     tb_quota_detail.COMPANY_NAME = set.Tables[0].Rows[0]["COMPANY_NAME"].ToString();
     tb_quota_detail.FILE_NAME = set.Tables[0].Rows[0]["FILE_NAME"].ToString();
     tb_quota_detail.FILE_SYSNAME = set.Tables[0].Rows[0]["FILE_SYSNAME"].ToString();
     tb_quota_detail.COMPANY_CODE = set.Tables[0].Rows[0]["COMPANY_CODE"].ToString();
     tb_quota_detail.FILE_TYPE = set.Tables[0].Rows[0]["FILE_TYPE"].ToString();
     tb_quota_detail.PD_QUOTA_SERVERPK = set.Tables[0].Rows[0]["PD_QUOTA_SERVERPK"].ToString();
     tb_quota_detail.PD_UP_MONEY = set.Tables[0].Rows[0]["PD_UP_MONEY"].ToString();
     tb_quota_detail.ISRECEIVE = set.Tables[0].Rows[0]["ISRECEIVE"].ToString();
     tb_quota_detail.ISHUIZHI = set.Tables[0].Rows[0]["ISHUIZHI"].ToString();
     tb_quota_detail.RECEIVE_MAN = set.Tables[0].Rows[0]["RECEIVE_MANNAME"].ToString();
     tb_quota_detail.HUIZHI_MAN = set.Tables[0].Rows[0]["RECEIVE_MANNAME"].ToString();
     return tb_quota_detail;
 }
コード例 #4
0
 private List<SMZJ.Model.TB_QUOTA_DETAIL> GetQUOTAModel(string PD_QUOTA_CODE)
 {
     List<SMZJ.Model.TB_QUOTA_DETAIL> list = new List<SMZJ.Model.TB_QUOTA_DETAIL>();
     if (base.Request.Form["table_xzxx_PD_QUOTA_CODE"] != null)
     {
         string[] strArray = base.Request.Form["table_xzxx_PD_QUOTA_CODE"].Split(new char[] { ',' });
         string[] strArray2 = base.Request.Form["PD_Company_NAME"].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++)
         {
             SMZJ.Model.TB_QUOTA_DETAIL item = new SMZJ.Model.TB_QUOTA_DETAIL
             {
                 PD_QUOTA_CODE = strArray[i],
                 COMPANY_CODE = strArray2[i]
             };
             if (defaultView != null)
             {
                 defaultView.RowFilter = " tableID='table_xzxx' and rowIndex=" + (i + 1);
                 if (defaultView.Count > 0)
                 {
                     item.FILE_NAME = defaultView[0]["FileName"].ToString();
                     item.FILE_SYSNAME = defaultView[0]["FileSysName"].ToString();
                 }
             }
             list.Add(item);
         }
     }
     return list;
 }
コード例 #5
0
 public SMZJ.Model.TB_QUOTA_DETAIL GetSonServerPK_Model(string COMPANY_CODE, string PD_QUOTA_CODE)
 {
     StringBuilder builder = new StringBuilder();
     builder.Append("select distinct PD_QUOTA_SERVERPK,RECEIVE_MAN from TB_QUOTA_DETAIL ");
     builder.Append(" where trim(PD_QUOTA_CODE)=:PD_QUOTA_CODE and trim(COMPANY_CODE)=:COMPANY_CODE and trim(IF_SHOW)=1");
     OracleParameter[] cmdParms = new OracleParameter[] { new OracleParameter(":PD_QUOTA_CODE", OracleType.VarChar, 50), new OracleParameter(":COMPANY_CODE", OracleType.VarChar, 50) };
     cmdParms[0].Value = PD_QUOTA_CODE;
     cmdParms[1].Value = COMPANY_CODE;
     SMZJ.Model.TB_QUOTA_DETAIL tb_quota_detail = new SMZJ.Model.TB_QUOTA_DETAIL();
     DataSet set = DbHelperOra.Query(builder.ToString(), cmdParms);
     if (set.Tables[0].Rows.Count > 0)
     {
         tb_quota_detail.PD_QUOTA_SERVERPK = set.Tables[0].Rows[0]["PD_QUOTA_SERVERPK"].ToString();
         tb_quota_detail.RECEIVE_MAN = set.Tables[0].Rows[0]["RECEIVE_MAN"].ToString();
         return tb_quota_detail;
     }
     return null;
 }