Ejemplo n.º 1
0
    //        //List<AuditReport> ls = new List<AuditReport>()
    //        //{
    //        //new AuditReport{ShowName=ar.ShowName.ToString(),LoctionText=ar.LoctionText.ToString(),Date=ar.Date,Time1=ar.Time1}
    //        //};

    protected void GridViewShowDetail_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        if (e.CommandName == "NewAudit")
        {
            Session["shownaudit_detail"] = e.CommandArgument.ToString();
            String   Session_value;
            string[] sessionvalue;
            Session_value = Session["shownaudit_detail"].ToString();
            sessionvalue  = Session_value.Split(',');
            DataTable dt = TransactionBOL.Check_AuditCount(sessionvalue[3].ToString(), sessionvalue[0].ToString(), DateTime.Now.ToString("dd/MM/yyyy"), sessionvalue[2].ToString());
            if (dt.Rows.Count == 2)
            {
                Page.ClientScript.RegisterStartupScript(typeof(Page), "Query", "alert('Already have 2 audit' !);", true);
                Label1.Visible = true;
                Label1.Text    = "This show already have 2 audit";
            }
            else
            {
                Response.Redirect("AuditLayout.aspx", false);
            }
        }
    }