Ejemplo n.º 1
0
    //<اطلاعات فاکتور را نمايش مي دهد>
    void fill_factor()
    {
        Shoping      ac = new Shoping();
        ShopingDatum dm = new ShopingDatum();
        DataSet      ds = new DataSet();
        decimal      Sum_Price;
        decimal      All_Sum_Price = 0;

        if (Request.QueryString["Id_Factor"] != null && Request.QueryString["Id_Factor"].Length > 0)
        {
            dm.Id_Factor = decimal.Parse(Request.QueryString["Id_Factor"].ToString());

            GridView1.DataSource = ac.select_factor_detail(dm);
            GridView1.DataBind();

            DataTable dt = ac.select_factor_one(dm);
            Label10.Text = dt.Rows[0]["date_register"].ToString();
            Label11.Text = dt.Rows[0]["id"].ToString();
            Label20.Text = dt.Rows[0]["factor_code"].ToString();

            Label32.Text = BLL.PublicClass.numberToMoney(dt.Rows[0]["sum_price"].ToString());
            Label31.Text = BLL.PublicClass.numberToMoney(dt.Rows[0]["send_price"].ToString());
            Label34.Text = BLL.PublicClass.numberToMoney(dt.Rows[0]["tasx"].ToString());
            if (Label34.Text.Trim() == "0")
            {
                Label33.Visible = false;
                Label34.Visible = false;
                Image3.Visible  = false;
            }

            Label44.Text = BLL.PublicClass.numberToMoney(dt.Rows[0]["discount"].ToString());
            if (Label44.Text.Trim() == "0")
            {
                Label43.Visible = false;
                Label44.Visible = false;
                Image5.Visible  = false;
            }

            for (int i = 0; i < GridView1.Rows.Count; i++)
            {
                Sum_Price     = decimal.Parse(((Label)(GridView1.Rows[i].FindControl("Label24"))).Text);
                All_Sum_Price = All_Sum_Price + Sum_Price;
            }
            Label36.Text = BLL.PublicClass.numberToMoney(All_Sum_Price.ToString());
            //Label47.Text = ds.Tables[0].Rows[0]["bank_name"].ToString();
            //Label42.Text = ds.Tables[0].Rows[0]["peyment_code"].ToString();
            //Label49.Text = ds.Tables[0].Rows[0]["bank_code"].ToString();
            //Label51.Text = ds.Tables[0].Rows[0]["peyment_date"].ToString();
            //Label53.Text = ds.Tables[0].Rows[0]["peyment_price"].ToString();
            //Label56.Text = ds.Tables[0].Rows[0]["customer_name"].ToString();

            //Label62.Text = ds.Tables[0].Rows[0]["customer_time_recive"].ToString();

            //Label66.Text = ds.Tables[0].Rows[0]["description"].ToString();
            lbDescription.Text = dt.Rows[0]["description"].ToString();
        }
    }
Ejemplo n.º 2
0
    void fill_factor()
    {
        Shoping      ac = new Shoping();
        ShopingDatum dm = new ShopingDatum();
        DataSet      ds = new DataSet();
        decimal      Sum_Price;
        decimal      All_Sum_Price = 0;


        dm.Id_Factor         = decimal.Parse(Request.QueryString["Id_Factor"].ToString());
        GridView1.DataSource = ac.select_factor_detail(dm);
        GridView1.DataBind();

        DataTable dt = ac.select_factor_one(dm);

        Label38.Text = Request.QueryString["Id_Factor"].ToString();
        Label22.Text = BLL.PublicClass.numberToMoney(dt.Rows[0]["sum_price"].ToString());
        Label19.Text = BLL.PublicClass.numberToMoney(dt.Rows[0]["send_price"].ToString());
        Label33.Text = BLL.PublicClass.numberToMoney(dt.Rows[0]["tasx"].ToString());
        if (Label33.Text == "0")
        {
            lblTasx.Visible = false;
        }

        Label40.Text = dt.Rows[0]["factor_condition"].ToString();

        Label2.Text  = dt.Rows[0]["date_register"].ToString();
        Label4.Text  = dt.Rows[0]["peyment_date"].ToString();
        Label12.Text = BLL.PublicClass.numberToMoney(dt.Rows[0]["discount"].ToString());
        if (Label12.Text == "0")
        {
            DivTakhfif.Visible = false;
        }
        if (Label4.Text.Length == 0)
        {
            PayDiv.Visible = false;
        }
        Label7.Text = dt.Rows[0]["date_send"].ToString();
        if (Label7.Text.Length == 0)
        {
            SendDiv.Visible = false;
        }


        for (int i = 0; i < GridView1.Rows.Count; i++)
        {
            Sum_Price     = decimal.Parse(((Label)(GridView1.Rows[i].FindControl("Label14"))).Text);
            All_Sum_Price = All_Sum_Price + Sum_Price;
        }
        Label15.Text = BLL.PublicClass.numberToMoney(All_Sum_Price.ToString());
    }
Ejemplo n.º 3
0
    void fill_factor()
    {
        int          userid;
        Shoping      ac = new Shoping();
        ShopingDatum dm = new ShopingDatum();
        DataSet      ds = new DataSet();
        decimal      Sum_Price;
        decimal      All_Sum_Price = 0;

        dm.Id_Factor         = decimal.Parse(Request.QueryString["Id_Factor"].ToString());
        GridView1.DataSource = ac.select_factor_detail(dm);
        GridView1.DataBind();
        DataTable dt = ac.select_factor_one(dm);

        userid              = int.Parse(dt.Rows[0]["id_user"].ToString());
        Label38.Text        = Request.QueryString["Id_Factor"].ToString();
        Label22.Text        = BLL.PublicClass.numberToMoney(dt.Rows[0]["sum_price"].ToString());
        TextBox11.Text      = dt.Rows[0]["send_price"].ToString();
        TextBox10.Text      = dt.Rows[0]["tasx"].ToString();
        TextBoxTakhfif.Text = dt.Rows[0]["Discount"].ToString();
        Label40.Text        = dt.Rows[0]["factor_condition"].ToString();
        Label2.Text         = dt.Rows[0]["date_register"].ToString();
        Label4.Text         = dt.Rows[0]["peyment_date"].ToString();
        txtDescription.Text = dt.Rows[0]["description"].ToString();
        for (int i = 0; i < GridView1.Rows.Count; i++)
        {
            Sum_Price     = decimal.Parse(((Label)(GridView1.Rows[i].FindControl("Label14"))).Text);
            All_Sum_Price = All_Sum_Price + Sum_Price;
        }
        Label15.Text = BLL.PublicClass.numberToMoney(All_Sum_Price.ToString());



        TextBox1.Text = dt.Rows[0]["peyment_code"].ToString();
        TextBox9.Text = dt.Rows[0]["bank_code"].ToString();
        TextBox2.Text = dt.Rows[0]["peyment_date"].ToString();
        TextBox3.Text = dt.Rows[0]["peyment_price"].ToString();
        TextBox4.Text = dt.Rows[0]["customer_name"].ToString();
        TextBox5.Text = dt.Rows[0]["customer_tell"].ToString();
        TextBox6.Text = dt.Rows[0]["customer_time_recive"].ToString();
        TextBox7.Text = dt.Rows[0]["customer_address"].ToString();
        TextBox8.Text = dt.Rows[0]["description"].ToString();
        if (dt.Rows[0]["peyment_kind"].ToString() == "واريز به حساب")
        {
            RadioButton2.Checked = true;
            RadioButton1.Checked = false;
        }
        else
        {
            RadioButton2.Checked = false;
            RadioButton1.Checked = true;
        }
        if (dt.Rows[0]["bank_name"].ToString().Length > 0)
        {
            DropDownList1.Items.FindByText(dt.Rows[0]["bank_name"].ToString()).Selected = true;
        }


        if (Label4.Text.Length == 0)
        {
            Label4.Text = "هنوز ثبت نشده است";
            FillUser(decimal.Parse(dt.Rows[0]["ID_User"].ToString()));
        }
        Label7.Text = dt.Rows[0]["date_send"].ToString();
        if (Label7.Text.Length == 0)
        {
            Label7.Text = "هنوز ارسال نشده است";
        }

        TextBox12.Text = new BLL.user().select_one_user(new userDatum()
        {
            Id = userid
        }).Rows[0]["post_code"].ToString();
    }