Ejemplo n.º 1
0
        protected void GridView2_RowDeleting(object sender, GridViewDeleteEventArgs e)
        {
            dalPDN    dal        = new dalPDN();
            Label     lblMaPhieu = (Label)GridView2.Rows[e.RowIndex].FindControl("lblSoPhieu");
            string    maCongTy   = Session["congty"].ToString();
            DataTable dt         = dal.LayTrangThaiTheoBangPDNA(maCongTy, lblMaPhieu.Text.Trim());

            if (dt.Rows.Count > 0)
            {
                LblTrangThai1.Text = dt.Rows[0]["YnName"].ToString();
            }
        }
        protected void GridView2_RowDeleting(object sender, GridViewDeleteEventArgs e)
        {
            dalPDN    dal        = new dalPDN();
            Label     lblMaPhieu = (Label)GridView2.Rows[e.RowIndex].FindControl("lblpdno");
            string    UserID     = Session["UserID"].ToString();
            string    GSBH       = Session["congty"].ToString();
            DataTable dt         = dal.LayTrangThaiDuyetTheoBangTrangThai(GSBH, lblMaPhieu.Text.Trim());

            if (dt.Rows.Count != 0)
            {
                lblTrangThai.Text = dt.Rows[0]["YnName"].ToString();
            }
            else
            {
                DataTable dtt = dal.LayTrangThaiTheoBangPDNA(GSBH, lblMaPhieu.Text.Trim());
                if (dtt.Rows.Count != 0)
                {
                    lblTrangThai.Text = dtt.Rows[0]["YnName"].ToString();
                }
            }
        }