Ejemplo n.º 1
0
        public DataSet DL_ChallanByadmin(EWA_Challanrecord objEWA)
        {
            try
            {
                SqlCommand cmd = new SqlCommand("SP_FeesDetails", con);
                cmd.CommandType = CommandType.StoredProcedure;
                cmd.Parameters.AddWithValue("@Action", "ChallanAmt_gethr");
                // cmd.Parameters.AddWithValue("@Id", objEWA.Id);
                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", "Approve By Admin");


                SqlDataAdapter da = new SqlDataAdapter(cmd);
                DataSet        ds = new DataSet();
                da.Fill(ds);

                return(ds);
            }
            catch (Exception)
            {
                throw;
            }
        }
        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_Challanrecord objEWA = new EWA_Challanrecord();
                            BL_Challanrecord  objBL  = new BL_Challanrecord();

                            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 ex)
            {
                throw ex;
            }
        }
Ejemplo n.º 3
0
 public DataSet BL_ChallanBySearchRep(EWA_Challanrecord objEWA)
 {
     try
     {
         return(objDL.DL_ChallanBySearchRep(objEWA));
     }
     catch (Exception)
     {
         throw;
     }
 }
        protected void grid_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            EWA_Challanrecord objEWA = new EWA_Challanrecord();
            BL_Challanrecord  objBL  = new BL_Challanrecord();

            Button btn1 = ((Button)grid.FindControl("btnapprove"));

            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();
                //objEWA.Status = Status.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_ChallanByadmin(objEWA);


                if (objEWA.GroupReceiptNo != null)
                {
                    //btn1.Enabled = false;
                }
            }
        }
Ejemplo n.º 5
0
        public DataSet DL_ChallanBySearchRep(EWA_Challanrecord 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;
            }
        }
        private void Getdata()
        {
            try
            {
                EWA_Challanrecord objEWA = new EWA_Challanrecord();
                BL_Challanrecord  objBL  = new BL_Challanrecord();

                DataSet ds = new DataSet();
                ds = objBL.BL_Challanrec(objEWA);

                // objEWA.GroupReceiptNo = "";
                if (ds.Tables[0].Rows.Count > 0)
                {
                    grid.DataSource = ds.Tables[0];
                    grid.DataBind();
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }