Exemplo n.º 1
0
    public int GetApprovalCount()
    {
        HttpClient hclient = new HttpClient();

        hclient.BaseAddress = new Uri(DataAcces.Url);
        hclient.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
        objPlSecondLevel = new PL_SecondLevel();
        var uri      = string.Format("api/SecondLevel/GetApprovalCount/?ind={0}&applicationid={1}&isconfirm={2}&doctype={3}", 4, lngapplicationId, 1, DocTypeID);
        var response = hclient.GetAsync(uri).Result;
        var getdata  = response.Content.ReadAsAsync <IEnumerable <PL_SecondLevel> >().Result;

        if (getdata.Count() > 0)
        {
            foreach (var a in getdata)
            {
                acnt = Convert.ToInt32(a.acnt);
            }
        }
        else
        {
            acnt = 0;
        }
        getdata = null; response = null; uri = null;
        return(acnt);
    }
Exemplo n.º 2
0
    protected void btnCorrection_Click(object sender, EventArgs e)
    {
        lblCancelSuccessMSG.Text = "";
        HttpClient HClient = new HttpClient();

        HClient.BaseAddress = new Uri(DataAcces.Url);
        HClient.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
        objPlSecondLevel               = new PL_SecondLevel();
        objPlSecondLevel.Ind           = 1;
        objPlSecondLevel.ApplicationID = Convert.ToInt32(ApplicatioID);
        objPlSecondLevel.Rollno        = txtRollNo.Text;
        objPlSecondLevel.SName         = txtStudentName.Text;
        objPlSecondLevel.ExamName      = txtExamName.Text;
        objPlSecondLevel.BranchName    = txtBranchName.Text;
        objPlSecondLevel.ExamSession   = Convert.ToString(0);
        objPlSecondLevel.EnrollmentNo  = txtEnrollmentlNo.Text;
        objPlSecondLevel.College       = txtCollege.Text;
        objPlSecondLevel.CGPA          = txtCGPA.Text;
        objPlSecondLevel.Division      = txtDivision.Text;
        objPlSecondLevel.UserID        = Session["UserId"].ToString();
        objPlSecondLevel.EntryByIP     = (IpAddress = GetIpAddress());
        var uri      = "api/SecondLevel/PostCorrectionRecord";
        var response = HClient.PostAsJsonAsync(uri, objPlSecondLevel).Result;

        if (response.IsSuccessStatusCode)
        {
            var getdata = response.Content.ReadAsAsync <IEnumerable <PL_SecondLevel> >().Result;
            if (getdata != null)
            {
                ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "Notify", "alert('Data Send to Correction.');window.location='FrmZeroLevel.aspx';", true);
            }
            getdata = null;
        }
        response = null; uri = null;
    }
Exemplo n.º 3
0
    protected void btnReject_Click1(object sender, EventArgs e)
    {
        lblCancelSuccessMSG.Text = "";
        HttpClient HClient = new HttpClient();

        HClient.BaseAddress = new Uri(DataAcces.Url);
        HClient.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
        objPlSecondLevel               = new PL_SecondLevel();
        objPlSecondLevel.Ind           = 1;
        objPlSecondLevel.ApplicationID = Convert.ToInt32(ApplicatioID);
        objPlSecondLevel.Rollno        = txtRollNo.Text;
        objPlSecondLevel.SName         = txtStudentName.Text;
        objPlSecondLevel.ExamName      = txtExamName.Text;
        objPlSecondLevel.BranchName    = txtBranchName.Text;
        objPlSecondLevel.ExamSession   = Convert.ToString(0);
        objPlSecondLevel.EnrollmentNo  = txtEnrollmentlNo.Text;
        objPlSecondLevel.College       = txtCollege.Text;
        objPlSecondLevel.CGPA          = txtCGPA.Text;
        objPlSecondLevel.Division      = txtDivision.Text;
        objPlSecondLevel.UserID        = Session["UserId"].ToString();
        objPlSecondLevel.EntryByIP     = (IpAddress = GetIpAddress());
        var uri      = "api/SecondLevel/PostRejectionRecord";
        var response = HClient.PostAsJsonAsync(uri, objPlSecondLevel).Result;

        if (response.IsSuccessStatusCode)
        {
            var getdata = response.Content.ReadAsAsync <IEnumerable <PL_SecondLevel> >().Result;
            if (getdata != null)
            {
                lblmsg.Text = "Mission Success";
            }
            getdata = null;
        }
        response = null; uri = null;
    }
        public DataTable ShowExamDetail(int Ind, string Rollno, string ExamYear, int OccCtrl, string ExamSession)
        {
            PL_SecondLevel pl = new PL_SecondLevel();

            pl.Ind         = Ind;
            pl.Rollno      = Rollno;
            pl.ExamYear    = ExamYear;
            pl.OccCtrl     = OccCtrl;
            pl.ExamSession = ExamSession;
            return(objDlSecondlevel.ShowExamDetail(pl));
        }
Exemplo n.º 5
0
 public DataTable ShowExamDetail(PL_SecondLevel plSecondLevel)
 {
     cmd             = new SqlCommand("SPApplicationDetail", con);
     cmd.CommandType = CommandType.StoredProcedure;
     cmd.Parameters.AddWithValue("@Ind", plSecondLevel.Ind);
     cmd.Parameters.AddWithValue("@Rollno", Convert.ToInt32(plSecondLevel.Rollno));
     cmd.Parameters.AddWithValue("@ExamYear", Convert.ToInt32(plSecondLevel.ExamYear));
     cmd.Parameters.AddWithValue("@OccCtrl", Convert.ToInt32(plSecondLevel.OccCtrl));
     cmd.Parameters.AddWithValue("@ExamSession", Convert.ToInt32(plSecondLevel.ExamSession));
     da = new SqlDataAdapter(cmd);
     dt = new DataTable();
     da.Fill(dt);
     return(dt);
 }
Exemplo n.º 6
0
        public DataTable SubmitCorrection(PL_SecondLevel pl)
        {
            DataTable dt = new DataTable();

            try
            {
                SqlCommand cmd = new SqlCommand("SPApplicationEntry", con);
                cmd.CommandType = CommandType.StoredProcedure;
                cmd.Parameters.AddWithValue("@Ind", pl.Ind);
                cmd.Parameters.AddWithValue("@IsConfirmed", false);
                cmd.Parameters.AddWithValue("@IsRejected", false);
                cmd.Parameters.AddWithValue("@IsCorrectionReqd", true);
                con.Open();
                int i = Convert.ToInt16(cmd.ExecuteScalar());
                con.Close();
                if (i > 0)
                {
                    SqlCommand cmd1 = new SqlCommand("SPApplicationEntry", con);
                    cmd1.CommandType = CommandType.StoredProcedure;
                    cmd1.Parameters.AddWithValue("@Ind", 2);
                    cmd1.Parameters.AddWithValue("@ApplicationID", pl.ApplicationID);
                    cmd1.Parameters.AddWithValue("@DocType", pl.DocTypeID);
                    cmd1.Parameters.AddWithValue("@LevelID", pl.UserID);
                    cmd1.Parameters.AddWithValue("@LevelRemark", "");
                    cmd1.Parameters.AddWithValue("@EntryByIP", pl.EntryByIP);
                    cmd1.Parameters.AddWithValue("@ApprovalCount", 1);
                    cmd1.Parameters.AddWithValue("@MaxApproval", pl.maxaproval);
                    cmd1.Parameters.AddWithValue("@RecordID", i);
                    cmd1.Parameters.AddWithValue("@IsConfirmed", false);
                    cmd1.Parameters.AddWithValue("@IsRejected", false);
                    cmd1.Parameters.AddWithValue("@IsCorrectionReqd", true);
                    da = new SqlDataAdapter(cmd1);
                    con.Close();
                    da.Fill(dt);
                    if (dt != null && dt.Rows.Count > 0)
                    {
                        //  return dt;
                    }
                    else
                    {
                        dt = null;
                    }
                }
            }
            catch (Exception ex)

            { msg = ex.Message; }
            return(dt);
        }
Exemplo n.º 7
0
    public DataTable ShowExamDetail(PL_SecondLevel pl)
    {
        HttpClient hclint = new HttpClient();

        hclint.BaseAddress = new Uri(DataAcces.Url);
        hclint.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("Application/Json"));
        dt = new DataTable();
        var uri      = string.Format("api/SecondLevel/ShowExamDetail?Ind={0}&Rollno={1}&ExamYear={2}&OccCtrl={3}&ExamSession={4}", pl.Ind, pl.Rollno, pl.ExamYear, pl.OccCtrl, pl.ExamSession);
        var response = hclint.PostAsJsonAsync(uri, objPlSecondLevel).Result;

        if (response.IsSuccessStatusCode)
        {
            dt = response.Content.ReadAsAsync <DataTable>().Result;
        }
        return(dt);
    }
Exemplo n.º 8
0
 public DataTable GetLevelRemark(PL_SecondLevel pl)
 {
     try
     {
         cmd             = new SqlCommand("SPApplicationEntry", con);
         cmd.CommandType = CommandType.StoredProcedure;
         cmd.Parameters.AddWithValue("@Ind", pl.Ind);
         cmd.Parameters.AddWithValue("@ApplicationID", pl.ApplicationID);
         da = new SqlDataAdapter(cmd);
         dt = new DataTable();
         da.Fill(dt);
     }
     catch (Exception ex)
     { msg = ex.Message; }
     return(dt);
 }
Exemplo n.º 9
0
 //For DL for Pending and Complete Data Grid for Level id >2 (3 to 7)
 public DataSet GetAppDetail(PL_SecondLevel pl)
 {
     try
     {
         cmd             = new SqlCommand("SPApplicationDetail", con);
         cmd.CommandType = CommandType.StoredProcedure;
         cmd.Parameters.AddWithValue("@levelid", pl.levelid);
         cmd.Parameters.AddWithValue("@Ind", pl.Ind);
         da = new SqlDataAdapter(cmd);
         ds = new DataSet();
         da.Fill(ds);
     }
     catch (Exception ex)
     { msg = ex.Message; }
     return(ds);
 }
Exemplo n.º 10
0
    public int GetRecordId()
    {
        HttpClient hclient = new HttpClient();

        hclient.BaseAddress = new Uri(DataAcces.Url);
        hclient.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
        objPlSecondLevel = new PL_SecondLevel();

        var uri      = string.Format("api/SecondLevel/GetRecordId/?Ind={0}&ApplicationId={1}", 3, lngapplicationId);
        var response = hclient.GetAsync(uri).Result;
        var getdata  = response.Content.ReadAsAsync <IEnumerable <PL_SecondLevel> >().Result;

        foreach (var a in getdata)
        {
            lngRecordId = a.recordId;
        }
        return(lngRecordId);
    }
 public DataTable PostCorrectionRecord(PL_SecondLevel objplSecondLevel)
 {
     objPlSecondlevel.dt = objDlSecondlevel.SubmitCorrection(objplSecondLevel);
     return(objPlSecondlevel.dt);
 }
Exemplo n.º 12
0
    protected async void grdPandingDetails_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        try
        {
            if (e.CommandName == "ShowPopup")
            {
                j = Convert.ToInt32(Session["UserTypeId"]);

                pnlform.Visible   = true;
                pnlform.Enabled   = false;
                lnkSubmit.Visible = false;

                LinkButton  btndetails = (LinkButton)e.CommandSource;
                GridViewRow gvrow      = (GridViewRow)btndetails.NamingContainer;
                int         rwindex    = gvrow.RowIndex;
                dt = new DataTable();
                dt = (DataTable)Session["PendingPopup"];
                if (dt.Rows.Count > 0)
                {
                    lblEntry.Text = "Applied For : " + dt.Rows[rwindex]["AppliedFor"].ToString().ToUpper();
                    ApprovalCount = 0;

                    txtRollNo.Text      = dt.Rows[rwindex]["RollNo"].ToString();
                    txtStudentName.Text = dt.Rows[rwindex]["StudentName"].ToString().ToUpper();
                    ApplicatioID        = Convert.ToInt64(dt.Rows[rwindex]["ApplicationID"].ToString());
                    lblappno.Text       = Convert.ToString(ApplicatioID);
                    lngapplicationId    = Convert.ToInt32(dt.Rows[rwindex]["ApplicationID"].ToString());
                    DocTypeID           = Convert.ToInt32(dt.Rows[rwindex]["DocTypeID"].ToString());

                    //txtExamSession.Text = dt.Rows[rwindex]["ExamSession"].ToString();
                    if ((dt.Rows[rwindex]["ExamSession"].ToString() == "SUMMER") || (dt.Rows[rwindex]["ExamSession"].ToString() == "2"))
                    {
                        txtExamSession.Text = "SUMMER";
                    }
                    else if ((dt.Rows[rwindex]["ExamSession"].ToString() == "WINTER") || (dt.Rows[rwindex]["ExamSession"].ToString() == "1"))
                    {
                        txtExamSession.Text = "WINTER";
                    }

                    txtExamYear.Text   = dt.Rows[rwindex]["ExamYear"].ToString().ToUpper();
                    HideFoil.ImageUrl  = dt.Rows[rwindex]["PartAImagePath"].ToString().ToUpper();
                    HideCF.ImageUrl    = dt.Rows[rwindex]["PartBImagePath"].ToString().ToUpper();
                    ImageFoil.ImageUrl = dt.Rows[rwindex]["PartAImagePath"].ToString().ToUpper();
                    ImageCF.ImageUrl   = dt.Rows[rwindex]["PartBImagePath"].ToString().ToUpper();
                    txtBranchName.Text = dt.Rows[rwindex]["ExamBranch"].ToString().ToUpper();
                    ImageCF.Width      = 400;

                    objPlSecondLevel.Ind      = 11;
                    objPlSecondLevel.Rollno   = dt.Rows[rwindex]["RollNo"].ToString();
                    objPlSecondLevel.ExamYear = dt.Rows[rwindex]["ExamYear"].ToString();
                    objPlSecondLevel.OccCtrl  = 0;

                    if (dt.Rows[rwindex]["ExamSession"].ToString() == "SUMMER")
                    {
                        objPlSecondLevel.ExamSession = "2";
                    }
                    else if (dt.Rows[rwindex]["ExamSession"].ToString() == "WINTER")
                    {
                        objPlSecondLevel.ExamSession = "1";
                    }

                    Convert.ToInt32(objPlSecondLevel.Rollno);
                    Convert.ToInt32(objPlSecondLevel.ExamYear);
                    Convert.ToInt32(objPlSecondLevel.ExamSession);

                    txtExamName.Text = dt.Rows[0]["ExamName"].ToString().Trim().ToUpper();

                    txtExamName.Enabled                = true; txtExamSession.Enabled = false; txtExamYear.Enabled = false; txtRollNo.Enabled = false;
                    trDivision.Visible                 = trCgpa.Visible = trEnroll.Visible = trCollege.Visible =
                        trSubjectName.Visible          = trDistinctionSub.Visible = trMeritNo.Visible =
                            trLaterReferenceNo.Visible = trLaterReferenceDate.Visible = trPassingYear.Visible = trExamMedium.Visible =
                                trAwardedBy.Visible    = TrawardPrice.Visible = trResulDeclarationDate.Visible = trRank.Visible = false;

                    if (DocTypeID == 1)
                    {
                        trDivision.Visible = true;
                        trCgpa.Visible     = true;
                        txtDivision.Text   = dt.Rows[rwindex]["Division"].ToString().ToUpper();
                        txtCGPA.Text       = dt.Rows[rwindex]["CGPAPercentage"].ToString().ToUpper();
                    }
                    else if (DocTypeID == 2)
                    {
                        trEnroll.Visible   = true;
                        trDivision.Visible = true;
                        trCgpa.Visible     = true;
                        trCollege.Visible  = true;

                        txtDivision.Text      = dt.Rows[rwindex]["Division"].ToString().ToUpper();
                        txtEnrollmentlNo.Text = dt.Rows[rwindex]["EnrollmentNo"].ToString().ToUpper();
                        txtCollege.Text       = dt.Rows[rwindex]["College"].ToString().ToUpper();
                        txtCGPA.Text          = dt.Rows[rwindex]["CGPAPercentage"].ToString();
                    }
                    else if (DocTypeID == 3)
                    {
                        trEnroll.Visible         = true;
                        trSubjectName.Visible    = true;
                        trDistinctionSub.Visible = true;

                        txtEnrollmentlNo.Text  = dt.Rows[rwindex]["EnrollmentNo"].ToString().ToUpper();
                        txtSubjectName.Text    = dt.Rows[rwindex]["SubjectName"].ToString().ToUpper();
                        txtDistinctionSub.Text = dt.Rows[rwindex]["DistinctionSubject"].ToString().ToUpper();
                    }
                    else if (DocTypeID == 4)
                    {
                        trMeritNo.Visible = true;
                        txtMeritNo.Text   = dt.Rows[rwindex]["MeritNo"].ToString().ToUpper();
                    }
                    else if (DocTypeID == 6)
                    {
                        trDivision.Visible = true;
                        trMeritNo.Visible  = trRank.Visible = trAwardedBy.Visible = TrawardPrice.Visible = true;
                        txtAwardPrize.Text = dt.Rows[rwindex]["AwardPrize"].ToString();
                        if (dt.Rows[rwindex]["Ranking"] == "IInd")
                        {
                            ddlRank.SelectedIndex = 2;
                        }
                        else
                        {
                            ddlRank.SelectedIndex = 1;
                        }

                        if (dt.Rows[rwindex]["AwardedBy"].ToString() == "Gold Medal")
                        {
                            ddlAwardedby.SelectedIndex = 1;
                        }
                        else if (dt.Rows[rwindex]["AwardedBy"].ToString() == "Silver Medal")
                        {
                            ddlAwardedby.SelectedIndex = 2;
                        }
                        else if (dt.Rows[rwindex]["AwardedBy"].ToString() == "Cash Prize")
                        {
                            ddlAwardedby.SelectedIndex = 3;
                        }

                        txtDivision.Text = dt.Rows[rwindex]["Division"].ToString().ToUpper();
                        txtMeritNo.Text  = dt.Rows[rwindex]["MeritNo"].ToString().ToUpper();
                    }
                    else if (DocTypeID == 8)
                    {
                        trDivision.Visible           = true;
                        trLaterReferenceNo.Visible   = true;
                        trLaterReferenceDate.Visible = true;

                        txtDivision.Text           = dt.Rows[rwindex]["Division"].ToString().ToUpper();
                        txtLaterReferenceNo.Text   = dt.Rows[rwindex]["LetterRefNo"].ToString().ToUpper();
                        txtLaterReferenceDate.Text = Convert.ToDateTime(dt.Rows[rwindex]["LetterRefDate"]).ToString("yyyy-MM-dd");
                    }
                    else if (DocTypeID == 9)
                    {
                        trDivision.Visible = trLaterReferenceNo.Visible =
                            trLaterReferenceDate.Visible = trPassingYear.Visible = true;
                        txtDivision.Text           = dt.Rows[rwindex]["Division"].ToString().ToUpper();
                        txtPassingYear.Text        = dt.Rows[rwindex]["ExamPassingYear"].ToString().ToUpper();
                        txtLaterReferenceNo.Text   = dt.Rows[rwindex]["LetterRefNo"].ToString().ToUpper();
                        txtLaterReferenceDate.Text = Convert.ToDateTime(dt.Rows[rwindex]["LetterRefDate"]).ToString("yyyy-MM-dd");
                    }
                    else if (DocTypeID == 11)
                    {
                        trExamMedium.Visible = true;
                        txtExamMedium.Text   = dt.Rows[rwindex]["ExamMedium"].ToString().ToUpper();
                    }
                    viewApplicationModal.Style.Add("display", "block");
                    //Popup(true);
                }
            }


            HttpClient hclient = new HttpClient();
            hclient.BaseAddress = new Uri(DataAcces.Url);
            hclient.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
            objPlSecondLevel = new PL_SecondLevel();
            var       uri               = string.Format("api/SecondLevel/GetLevelRemark/?Ind={0}&ApplicationId={1}", 5, lngapplicationId);
            DataTable dtlevel           = null;
            var       response          = hclient.GetAsync(uri).Result;
            var       productJsonString = await response.Content.ReadAsStringAsync();

            dtlevel = JsonConvert.DeserializeObject <DataTable>(productJsonString);


            StringBuilder sb = new StringBuilder();

            if (dtlevel.Rows.Count > 0)
            {
                sb.Append("<table style='width:100%; border:1px solid;'>");
                sb.Append("<tr style='background-color:#50618c; color:white; border:1px solid;'> <th style='width:15%;'>Approval By </th><th style='width:15%;'> Approval Date </th> <th style='width:25%;'> Remark</th></tr>");
                for (int i = 0; i < dtlevel.Rows.Count; i++)
                {
                    sb.Append("<tr>");
                    sb.Append("<td style='display:none;'>" + dtlevel.Rows[i]["LevelID"] + "</td>");
                    sb.Append("<td style='border:1px solid; width:15%;'> " + dtlevel.Rows[i]["LevelDesc"] + "</td>");
                    sb.Append("<td style='border:1px solid; text-align:center; width:15%;'>" + dtlevel.Rows[i]["ApprovalDate"] + " </td>");
                    sb.Append("<td style='border:1px solid; width:25%;'>" + dtlevel.Rows[i]["LevelRemark"] + " </td>");
                    sb.Append("</tr>");
                }
                sb.Append("</table>");
                tblRemark.InnerHtml = sb.ToString();
            }
            // dtlevel = null;
        }
        catch
        { }
    }