Ejemplo n.º 1
0
        //获取跟踪记录列表
        //获取商机列表
        public static List<GenZongJL> getGenZongJL(string shangjixh, int pageindex, string orderby)
        {
            List<GenZongJL> rtn = new List<GenZongJL>();

            using (OracleConnection conn = GetOraConnection())
            {
                conn.Open();

                OracleCommand cmd = new OracleCommand();
                cmd.Connection = conn;
                cmd.CommandText = "select * from v_sjgl_e_genzongjl a where SHANGJIXH = '" + shangjixh + "' order by baifangrq desc "; //"0283"
                cmd.CommandType = CommandType.Text;

                OracleDataReader dr = cmd.ExecuteReader();

                int i = 0;
                while (dr.Read())
                {
                    GenZongJL item = new GenZongJL();
                    item.BaiFangRQ = dr["BaiFangRQ"].ToString().Substring(0, 10);
                    item.ShiJianDuan = dr["ShiJianDuan"].ToString();
                    item.BaiFangDX = dr["BaiFangDX"].ToString();
                    item.GenZhongFS = dr["GenZhongFS"].ToString();
                    item.GenZongFKQK = dr["GenZongFKQK"].ToString();
                    item.XieTongRYMC = dr["XieTongRYMC"].ToString();
                    i++;

                    rtn.Add(item);

                    for (int k = 0; k < i; k++)
                    {
                        rtn[k].CiShu = (i - k).ToString();
                    }

                }
            }

            return rtn;
        }
Ejemplo n.º 2
0
        public static string AddGenZongJL(GenZongJL gzjl)
        {
            string rtn = string.Empty;

            using (OracleConnection conn = GetOraConnection())
            {
                conn.Open();

                OracleCommand cmd = new OracleCommand();
                cmd.Connection = conn;
                cmd.CommandText = "PKG_SJGL.PRC_AddShangJiGXJR";
                cmd.CommandType = CommandType.StoredProcedure;

                cmd.Parameters.Add("prm_ShangJiXH", OracleDbType.Int32).Value = int.Parse(gzjl.ShangJiXH);
                cmd.Parameters.Add("prm_GenZongFS", OracleDbType.Varchar2, 10).Value = gzjl.GenZhongFS ;
                cmd.Parameters.Add("prm_BaiFangRQ", OracleDbType.Date ).Value = Convert.ToDateTime(gzjl.BaiFangRQ).Date ;
                cmd.Parameters.Add("prm_BaiFangDX", OracleDbType.Varchar2, 10).Value = gzjl.BaiFangDX;
                cmd.Parameters.Add("prm_GenZongFK", OracleDbType.Varchar2, 10).Value = gzjl.GenZongFKQK;
                cmd.Parameters.Add("prm_XieTongRYID", OracleDbType.Varchar2, 10).Value = gzjl.XieTongRYID ;
                cmd.Parameters.Add("prm_XieTongRYMC", OracleDbType.Varchar2, 10).Value = gzjl.XieTongRYMC;
                cmd.Parameters.Add("prm_XieTongRYBMID", OracleDbType.Varchar2, 10).Value = gzjl.XieTongRYBMID;
                cmd.Parameters.Add("prm_XieTongRYBMMC", OracleDbType.Varchar2, 10).Value = gzjl.XieTongRYBMMC;
                cmd.Parameters.Add("prm_ZhiGongID", OracleDbType.Varchar2, 500).Value = gzjl.ChuangJianRID;

                try
                {
                    int i = cmd.ExecuteNonQuery();
                    rtn = i.ToString();
                }
                catch (Exception ex)
                {
                    rtn = ex.Message;
                }
            }

            return rtn;
        }