Exemplo n.º 1
0
        public VBuyReturn getByID(string BuyReturnID)
        {
            bool       flag    = false;
            string     s       = "";
            VBuyReturn return2 = new VBuyReturn();

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

            if (reader.Read())
            {
                s = reader.GetValue(reader.GetOrdinal("AlreadyPay")).ToString();
                return2.AlreadyPay    = float.Parse(s);
                return2.Description   = reader.GetString(reader.GetOrdinal("Description"));
                return2.Identitys     = reader.GetInt32(reader.GetOrdinal("Identitys"));
                return2.HouseDetailID = reader.GetInt32(reader.GetOrdinal("HouseDetailID"));
                return2.RealName      = reader.GetString(reader.GetOrdinal("RealName"));
                return2.BuyReturnDate = reader.GetString(reader.GetOrdinal("BuyReturnDate"));
                return2.BuyReturnID   = reader.GetString(reader.GetOrdinal("BuyReturnID"));
                return2.State         = reader.GetInt32(reader.GetOrdinal("State"));
                s = reader.GetValue(reader.GetOrdinal("TotalPrice")).ToString();
                return2.TotalPrice  = float.Parse(s);
                return2.TradeDate   = reader.GetString(reader.GetOrdinal("TradeDate"));
                return2.UserName    = reader.GetString(reader.GetOrdinal("UserName"));
                return2.HouseName   = reader.GetString(reader.GetOrdinal("HouseName"));
                return2.SubareaName = reader.GetString(reader.GetOrdinal("SubareaName"));
                flag = true;
            }
            reader.Close();
            return(flag ? return2 : null);
        }
Exemplo n.º 2
0
    protected void init()
    {
        string str0     = Request.QueryString["BuyReturnID"].ToString();
        string username = getUserName();

        VBuyReturn b = new VBuyReturn();

        b = Leyp.SQLServerDAL.Buy.Factory.getBuyReturnDAL().getViewNodeByID(str0);
        if (b.UserName.Equals(username))
        {
            if (Leyp.SQLServerDAL.Buy.Factory.getBuyReturnDAL().deleteEitity(str0))
            {
                Panel1.Visible = true;
            }
            else
            {
                Response.Write("操作失败");
                Response.End();
            }
        }
        else
        {
            Response.Write("操作失败!没有权限");
            Response.End();
        }
    }
Exemplo n.º 3
0
        public List <VBuyReturn> getBuyReturnOrderList(string beginDate, string endDate, int sideState)
        {
            string            s    = "";
            List <VBuyReturn> list = new List <VBuyReturn>();

            SqlParameter[] parameters = new SqlParameter[] { new SqlParameter("@beginDate", SqlDbType.NVarChar), new SqlParameter("@endDate", SqlDbType.NVarChar), new SqlParameter("@sideState", SqlDbType.Int) };
            parameters[0].Value = beginDate;
            parameters[1].Value = endDate;
            parameters[2].Value = sideState;
            SqlDataReader reader = SQLHelper.RunProcedure("p_BuyReturn_getBuyReturnOrderList", parameters);

            while (reader.Read())
            {
                VBuyReturn item = new VBuyReturn();
                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.BuyReturnDate = reader.GetString(reader.GetOrdinal("BuyReturnDate"));
                item.BuyReturnID   = reader.GetString(reader.GetOrdinal("BuyReturnID"));
                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);
        }
Exemplo n.º 4
0
    public void init()
    {
        string str0 = Request.QueryString["BuyReturnID"].ToString();

        VBuyReturn vb = Leyp.SQLServerDAL.Buy.Factory.getBuyReturnDAL().getViewNodeByID(str0);

        if (vb == null)
        {
            Response.Write("没有你要的数据");
            Response.End();
        }
        BuyReturnID.Text   = vb.BuyReturnID;
        BuyReturnDate.Text = vb.BuyReturnDate;
        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();
    }