protected void btnGetDetails_Click(object sender, EventArgs e) { try { string constr = ConfigurationManager.ConnectionStrings["DBConnection"].ConnectionString; using (SqlConnection con = new SqlConnection(constr)) { using (SqlCommand cmd = new SqlCommand()) { if (!string.IsNullOrEmpty(txtChallanrepNo.Text.Trim())) { EWA_ChallanRecAdmin objEWA = new EWA_ChallanRecAdmin(); BL_ChallanRecAdmin objBL = new BL_ChallanRecAdmin(); cmd.Parameters.AddWithValue("@GroupReceiptNo", txtChallanrepNo.Text.Trim()); string GroupReceiptNo = txtChallanrepNo.Text; objEWA.GroupReceiptNo = GroupReceiptNo.ToString(); DataSet ds = new DataSet(); ds = objBL.BL_ChallanBySearchRep(objEWA); if (ds.Tables[0].Rows.Count > 0) { grid.DataSource = ds.Tables[0]; grid.DataBind(); } } } } } catch (Exception) { throw; } }
public DataSet DL_ChallanByHr(EWA_ChallanRecAdmin objEWA) { try { SqlCommand cmd = new SqlCommand("SP_FeesDetails", con); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.AddWithValue("@Action", "ChallanAmt_Approvehr"); cmd.Parameters.AddWithValue("@GroupReceiptNo", objEWA.GroupReceiptNo); cmd.Parameters.AddWithValue("@StudentId", objEWA.StudentId); cmd.Parameters.AddWithValue("@StudentName", objEWA.StudentName); cmd.Parameters.AddWithValue("@TotalAmount", objEWA.TotalAmount); cmd.Parameters.AddWithValue("@PaidAmount", objEWA.PaidAmount); cmd.Parameters.AddWithValue("@PendingAmount", objEWA.PendingAmount); cmd.Parameters.AddWithValue("@Status", objEWA.Status); SqlDataAdapter da = new SqlDataAdapter(cmd); DataSet ds = new DataSet(); da.Fill(ds); return(ds); } catch (Exception ex) { throw ex; } }
public DataSet BL_ChallanBySearchRep(EWA_ChallanRecAdmin objEWA) { try { return(objDL.DL_ChallanBySearchRep(objEWA)); } catch (Exception) { throw; } }
public DataSet BL_Challanhr(EWA_ChallanRecAdmin objEWA) { try { return(objDL.DL_ChallanByHr(objEWA)); } catch (Exception ex) { throw ex; } }
public DataSet DL_ChallanByAdmin(EWA_ChallanRecAdmin objEWA) { try { SqlCommand cmd = new SqlCommand("SP_ChallanFeesHr", con); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.AddWithValue("@Action", "ChallanAmt_getdisplayhr"); SqlDataAdapter da = new SqlDataAdapter(cmd); DataSet ds = new DataSet(); da.Fill(ds); return(ds); } catch (Exception ex) { throw ex; } }
public DataSet DL_ChallanBySearchRep(EWA_ChallanRecAdmin objEWA) { try { SqlCommand cmd = new SqlCommand("SP_ChallanFees", con); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.AddWithValue("@Action", "ChallanAmt_getadminonsearch"); cmd.Parameters.AddWithValue("@GroupReceiptNo", objEWA.GroupReceiptNo); SqlDataAdapter da = new SqlDataAdapter(cmd); DataSet ds = new DataSet(); da.Fill(ds); return(ds); } catch (Exception) { throw; } }
protected void GetData() { try { EWA_ChallanRecAdmin objEWA = new EWA_ChallanRecAdmin(); BL_ChallanRecAdmin objBL = new BL_ChallanRecAdmin(); DataSet ds = new DataSet(); ds = objBL.BL_ChallanRecAdminhr(objEWA); { if (ds.Tables[0].Rows.Count > 0) { grid.DataSource = ds.Tables[0]; grid.DataBind(); } } } catch (Exception ex) { throw ex; } }
protected void grid_RowCommand(object sender, GridViewCommandEventArgs e) { EWA_ChallanRecAdmin objEWA = new EWA_ChallanRecAdmin(); BL_ChallanRecAdmin objBL = new BL_ChallanRecAdmin(); if (e.CommandName == "Approve") { //Determine the RowIndex of the Row whose Button was clicked. int rowIndex = Convert.ToInt32(e.CommandArgument); //Reference the GridView Row. GridViewRow row = grid.Rows[rowIndex]; //Fetch value of Name. string GroupReceiptNo = row.Cells[1].Text; //Fetch value of Country string StudentId = row.Cells[2].Text; string StudentName = row.Cells[3].Text; string TotalAmount = row.Cells[4].Text; string PaidAmount = row.Cells[5].Text; string PendingAmount = row.Cells[6].Text; objEWA.GroupReceiptNo = GroupReceiptNo.ToString(); objEWA.StudentId = StudentId.ToString(); objEWA.StudentName = StudentName.ToString(); objEWA.TotalAmount = TotalAmount.ToString(); objEWA.PaidAmount = PaidAmount.ToString(); objEWA.PendingAmount = PendingAmount.ToString(); // ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('GroupReceiptNo: " + GroupReceiptNo + "\\nStudentId: " + StudentId + "\\nStudentName: " + StudentName + "\\nTotalAmount: " + TotalAmount + "\\nPaidAmount: " + PaidAmount + "\\nPendingAmount: " + PendingAmount + "\\nStatus: " + Status + "');", true); DataSet ds = new DataSet(); ds = objBL.BL_Challanhr(objEWA); } }