Example #1
0
 private void bindRadio()
 {
     try
     {
         cmd = new SqlCommand("select ID from InstitutionReg where Name='" + ddlFinalOpn.SelectedValue.ToString() + "'", con);
         string Insid = Convert.ToString(cmd.ExecuteScalar());
         cmd.ExecuteNonQuery();
         cmd = new SqlCommand("update Project set Status='ProformaAApproved',Institution='" + ddlFinalOpn.SelectedValue.ToString() + "', InstitutionID='" + Insid + "',Remark='" + txtSynRemarks.Text.ToString() + "', ProjectNo='" + txtProjectNo.Text.ToString() + "' where EntryStatus='Running' and SID='" + GridAppPerfmA.SelectedRow.Cells[2].Text.ToString() + "'", con);
         cmd.ExecuteNonQuery();
         ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "success", "alert('Data Approved Successfully!')", true);
         bindGrid(); pnlData.Visible = false; GridAppPerfmA.Focus();
     }
     catch (NullReferenceException ex) { lblApprvExcep.Text = "Invalid!"; }
 }
Example #2
0
    private void okk(string strid)
    {
        lblExceptionOK.Text = "";
        adp = new SqlDataAdapter("select DiaryA,SID,Course,Part,SynopsisDate,Status from Project where sid='" + strid + "' and Status='ProformaASubmitted' and EntryStatus='Running'", con);
        DataTable dt = new DataTable();

        adp.Fill(dt);
        GridAppPerfmA.DataSource = dt;
        GridAppPerfmA.DataBind();
        GridAppPerfmA.Focus();
        if (GridAppPerfmA.Rows.Count == 0)
        {
            txtSID.Text = ""; lblExceptionOK.Text = "Please Enter Correct Membership ID!"; txtSID.Focus();
        }
    }