Exemplo n.º 1
0
    void init_data(string workorder, string workorder_f)
    {
        string sql = @"exec [usp_app_bhgp_deal_init] '{0}','{1}'";

        sql = string.Format(sql, workorder, workorder_f);
        DataSet ds = SQLHelper.Query(sql);

        DataTable dt = ds.Tables[0];

        listBxInfo.DataSource = dt;
        listBxInfo.DataBind();
        cur_qty.Text             = dt.Rows[0]["cur_qty"].ToString();
        ng_reason_main.Text      = dt.Rows[0]["reason_code"].ToString();
        ng_reason_desc_main.Text = dt.Rows[0]["reason"].ToString();
        workorder_qc.Text        = dt.Rows[0]["workorder_qc"].ToString();

        //DataTable dt1 = ds.Tables[1];
        //Repeater_cz.DataSource = dt1;
        //Repeater_cz.DataBind();

        DataTable dt1 = ds.Tables[1];

        Repeater_cz_one.DataSource = dt1;
        Repeater_cz_one.DataBind();

        DataTable dt2 = ds.Tables[2];

        Repeater_fg.DataSource = dt2;
        Repeater_fg.DataBind();

        DataTable dt3 = ds.Tables[3];

        Repeater_cz_again.DataSource = dt3;
        Repeater_cz_again.DataBind();

        DataTable dt4 = ds.Tables[4];

        Repeater_fx.DataSource = dt4;
        Repeater_fx.DataBind();

        DataTable dt5 = ds.Tables[5];

        Repeater_cz_fx_again.DataSource = dt5;
        Repeater_cz_fx_again.DataBind();

        DataTable dt6 = ds.Tables[6];

        listBx_deal.DataSource = dt6;
        listBx_deal.DataBind();

        ViewState["dt1"] = dt1.Rows.Count.ToString();
        ViewState["dt2"] = dt2.Rows.Count.ToString();
        ViewState["dt3"] = dt3.Rows.Count.ToString();
        ViewState["dt4"] = dt4.Rows.Count.ToString();
        ViewState["dt5"] = dt5.Rows.Count.ToString();
    }
Exemplo n.º 2
0
    void init_data(string workorder, string workorder_f)
    {
        string sql = @"exec [usp_app_bhgp_sign_init_V1] '{0}','{1}'";

        sql = string.Format(sql, workorder, _workorder_f);
        DataSet ds = SQLHelper.Query(sql);

        DataTable dt = ds.Tables[0];

        listBxInfo.DataSource = dt;
        listBxInfo.DataBind();
        lbl_fg.Text          = dt.Rows[0]["cur_result"].ToString();
        pgino.Text           = dt.Rows[0]["pgino"].ToString();
        workorder_qc.Text    = dt.Rows[0]["workorder_qc"].ToString();
        op.Text              = dt.Rows[0]["op"].ToString();
        laiyuan_dh_desc.Text = dt.Rows[0]["laiyuan_dh_desc"].ToString();

        DataTable dt1 = ds.Tables[1];

        Repeater_cz_one.DataSource = dt1;
        Repeater_cz_one.DataBind();

        DataTable dt2 = ds.Tables[2];

        Repeater_fg.DataSource = dt2;
        Repeater_fg.DataBind();

        DataTable dt3 = ds.Tables[3];

        Repeater_cz_again.DataSource = dt3;
        Repeater_cz_again.DataBind();

        DataTable dt4 = ds.Tables[4];

        Repeater_fx.DataSource = dt4;
        Repeater_fx.DataBind();

        DataTable dt5 = ds.Tables[5];

        Repeater_cz_fx_again.DataSource = dt5;
        Repeater_cz_fx_again.DataBind();

        ViewState["dt1"] = dt1.Rows.Count.ToString();
        ViewState["dt2"] = dt2.Rows.Count.ToString();
        ViewState["dt3"] = dt3.Rows.Count.ToString();
        ViewState["dt4"] = dt4.Rows.Count.ToString();
        ViewState["dt5"] = dt5.Rows.Count.ToString();
    }
Exemplo n.º 3
0
    void init_data(string workorder, string workorder_f, string location)
    {
        yb_qty.Text = "0";

        //-------------
        string sql = @"exec [usp_app_bhgp_Apply_init_V1] '{0}','{1}'";

        sql = string.Format(sql, workorder, workorder_f);
        DataSet ds = SQLHelper.Query(sql);

        DataTable dt = ds.Tables[0];

        if (dt.Rows.Count == 1)
        {
            pgino.Text         = dt.Rows[0]["pgino"].ToString();
            pn.Text            = dt.Rows[0]["pn"].ToString();
            descr.Text         = dt.Rows[0]["descr"].ToString();
            op.Text            = dt.Rows[0]["op"].ToString() + "-" + dt.Rows[0]["op_descr"].ToString();
            b_use_routing.Text = dt.Rows[0]["b_use_routing"].ToString();
            b_op_one.Text      = dt.Rows[0]["b_op_one"].ToString();
            lot_no_fixed.Text  = dt.Rows[0]["lot_no_fixed"].ToString();
            //qty.Text = dt.Rows[0]["qty"].ToString();
            yb_qty.Text           = dt.Rows[0]["qty"].ToString();
            reason.Text           = dt.Rows[0]["reason_code"].ToString() + "-" + dt.Rows[0]["reason"].ToString();
            comment.Value         = dt.Rows[0]["comment"].ToString();
            laiyuan_dh_desc.Text  = dt.Rows[0]["laiyuan_dh_desc"].ToString();
            workorder_qc_loc.Text = dt.Rows[0]["workorder_qc_loc"].ToString();

            listBxInfo.DataSource = dt;
            listBxInfo.DataBind();

            cur_qty.Text             = dt.Rows[0]["cur_qty"].ToString();
            ng_reason_main.Text      = dt.Rows[0]["reason_code"].ToString();
            ng_reason_desc_main.Text = dt.Rows[0]["reason"].ToString();
            workorder_qc.Text        = dt.Rows[0]["workorder_qc"].ToString(); ref_order.Text = dt.Rows[0]["workorder_qc"].ToString();

            if (cur_qty.Text == "0")//剩余数量为0
            {
                UpdatePanel1.Visible = false;
            }
        }


        //是否可以修改数量:申请人本人,且申请数量=剩余数量
        string    sql_wk = @"select * from Mes_App_WorkOrder_Ng_deal_Detail with(nolock) where workorder='" + workorder + "'";
        DataTable dt_wk  = SQLHelper.Query(sql_wk).Tables[0];

        if (dt.Rows.Count <= 0)
        {
            _tab_index = 0; _ismodify = "Y";
        }

        /*else if (emp_code_name.Text == (dt.Rows[0]["emp_code"].ToString() + dt.Rows[0]["emp_name"].ToString())
         *  && dt_wk.Rows.Count <= 0 && dt.Rows[0]["loading_type_qc"].ToString()!="99")//dt.Rows[0]["qty"].ToString() == dt.Rows[0]["sy_qty"].ToString()*/
        else if (location == dt.Rows[0]["login_location"].ToString() &&
                 dt_wk.Rows.Count <= 0 && dt.Rows[0]["loading_type_qc"].ToString() != "99")
        {
            _tab_index = 0; _ismodify = "Y1";//排除参考号
        }
        else
        {
            _tab_index = 1; _ismodify = "N";
        }

        DataTable dt1 = ds.Tables[1];

        Repeater_cz_one.DataSource = dt1;
        Repeater_cz_one.DataBind();

        DataTable dt2 = ds.Tables[2];

        Repeater_fg.DataSource = dt2;
        Repeater_fg.DataBind();

        DataTable dt3 = ds.Tables[3];

        Repeater_cz_again.DataSource = dt3;
        Repeater_cz_again.DataBind();

        DataTable dt4 = ds.Tables[4];

        Repeater_fx.DataSource = dt4;
        Repeater_fx.DataBind();

        DataTable dt5 = ds.Tables[5];

        Repeater_cz_fx_again.DataSource = dt5;
        Repeater_cz_fx_again.DataBind();

        DataTable dt6 = ds.Tables[6];

        listBx_deal.DataSource = dt6;
        listBx_deal.DataBind();

        ViewState["dt"]  = dt.Rows.Count.ToString();
        ViewState["dt1"] = dt1.Rows.Count.ToString();
        ViewState["dt2"] = dt2.Rows.Count.ToString();
        ViewState["dt3"] = dt3.Rows.Count.ToString();
        ViewState["dt4"] = dt4.Rows.Count.ToString();
        ViewState["dt5"] = dt5.Rows.Count.ToString();
    }