Ejemplo n.º 1
0
        public VBuyReceipt getViewByID(string ReceiptOrderID)
        {
            string      s       = "";
            VBuyReceipt receipt = new VBuyReceipt();

            SqlParameter[] parameters = new SqlParameter[] { new SqlParameter("@ReceiptOrderID", SqlDbType.NVarChar) };
            parameters[0].Value = ReceiptOrderID;
            SqlDataReader reader = SQLHelper.RunProcedure("p_BuyReceipt_getListByReceiptOrderID", parameters);

            if (reader.Read())
            {
                s = reader.GetValue(reader.GetOrdinal("AlreadyPay")).ToString();
                receipt.AlreadyPay       = float.Parse(s);
                receipt.Description      = reader.GetString(reader.GetOrdinal("Description"));
                receipt.BuyOrderID       = reader.GetString(reader.GetOrdinal("BuyOrderID"));
                receipt.Identitys        = reader.GetInt32(reader.GetOrdinal("Identitys"));
                receipt.RealName         = reader.GetString(reader.GetOrdinal("RealName"));
                receipt.ReceiptOrderDate = reader.GetString(reader.GetOrdinal("ReceiptOrderDate"));
                receipt.ReceiptOrderID   = reader.GetString(reader.GetOrdinal("ReceiptOrderID"));
                receipt.State            = reader.GetInt32(reader.GetOrdinal("State"));
                s = reader.GetValue(reader.GetOrdinal("TotalPrice")).ToString();
                receipt.TotalPrice  = float.Parse(s);
                receipt.TradeDate   = reader.GetString(reader.GetOrdinal("TradeDate"));
                receipt.UserName    = reader.GetString(reader.GetOrdinal("UserName"));
                receipt.HouseName   = reader.GetString(reader.GetOrdinal("HouseName"));
                receipt.SubareaName = reader.GetString(reader.GetOrdinal("SubareaName"));
            }
            return(receipt);
        }
Ejemplo n.º 2
0
        public List <VBuyReceipt> getListByReceiptOrderID(string ReceiptOrderID)
        {
            string             s    = "";
            List <VBuyReceipt> list = new List <VBuyReceipt>();

            SqlParameter[] parameters = new SqlParameter[] { new SqlParameter("@ReceiptOrderID", SqlDbType.NVarChar) };
            parameters[0].Value = ReceiptOrderID;
            SqlDataReader reader = SQLHelper.RunProcedure("p_BuyReceipt_getListByReceiptOrderID", parameters);

            while (reader.Read())
            {
                VBuyReceipt item = new VBuyReceipt();
                s = reader.GetValue(reader.GetOrdinal("AlreadyPay")).ToString();
                item.AlreadyPay       = float.Parse(s);
                item.Description      = reader.GetString(reader.GetOrdinal("Description"));
                item.Identitys        = reader.GetInt32(reader.GetOrdinal("Identitys"));
                item.RealName         = reader.GetString(reader.GetOrdinal("RealName"));
                item.ReceiptOrderDate = reader.GetString(reader.GetOrdinal("ReceiptOrderDate"));
                item.ReceiptOrderID   = reader.GetString(reader.GetOrdinal("ReceiptOrderID"));
                item.State            = reader.GetInt32(reader.GetOrdinal("State"));
                s = reader.GetValue(reader.GetOrdinal("TotalPrice")).ToString();
                item.TotalPrice  = float.Parse(s);
                item.TradeDate   = reader.GetString(reader.GetOrdinal("TradeDate"));
                item.UserName    = reader.GetString(reader.GetOrdinal("UserName"));
                item.HouseName   = reader.GetString(reader.GetOrdinal("HouseName"));
                item.SubareaName = reader.GetString(reader.GetOrdinal("SubareaName"));
                list.Add(item);
            }
            reader.Close();
            return(list);
        }
Ejemplo n.º 3
0
    public void init()
    {
        string str0 = Request.QueryString["ReceiptOrderID"].ToString();

        VBuyReceipt vb = Leyp.SQLServerDAL.Buy.Factory.getBuyReceiptDAL().getViewByID(str0);

        if (vb == null)
        {
            Response.Write("没有你要的数据");
            Response.End();
        }
        ReceiptOrderID.Text   = vb.ReceiptOrderID;
        ReceiptOrderDate.Text = vb.ReceiptOrderDate;
        RealName.Text         = vb.RealName;
        HouseName.Text        = vb.HouseName + "----" + vb.SubareaName;
        TradeDate.Text        = vb.TradeDate;
        Description.Text      = vb.Description;
        State.Text            = changString(vb.State.ToString());
        TotalPrice.Text       = vb.TotalPrice.ToString();
    }