public bool Delete(string ProjectIdtext)
 {
     try
     {
         string query = "DELETE From UpcomingEventTable WHERE ProjectID='" + ProjectIdtext + "'";
         DatabaseConnectionClass dcc = new DatabaseConnectionClass();
         dcc.ConnectWithDB();
         int x = dcc.ExecuteSQL(query);
         return(true);
     }
     catch (Exception ex)
     {
         return(false);
     }
 }
 public bool DeleteReciever(string RecieverIdtext)
 {
     try
     {
         string query = "DELETE From RecieverPeopleTable WHERE RecieverId='" + RecieverIdtext + "'";
         DatabaseConnectionClass dcc = new DatabaseConnectionClass();
         dcc.ConnectWithDB();
         int x = dcc.ExecuteSQL(query);
         return(true);
     }
     catch (Exception ex)
     {
         return(false);
     }
 }
 //  }
 //}
 public bool Update(Donarpeople dp)
 {
     try
     {
         string query2 = "UPDATE DonatorInfoTable SET DonarName = '" + dp.DonarName + "', DonarPhoneno = " + dp.DonarPhoneno + "WHERE  DonarId = '" + dp.DonarId + "'";
         DatabaseConnectionClass dcc = new DatabaseConnectionClass();
         dcc.ConnectWithDB();
         int x = dcc.ExecuteSQL(query2);
         return(true);
     }
     catch (Exception exasz)
     {
         return(false);
     }
 }
 bool Insert(DonationByNgo d)
 {
     try
     {
         string query = "INSERT into DonationNGOgivenByTable VALUES ('" + d.DonationId + "', '" + d.DonationTitle + "', '" + d.RecieverId + "', '" + d.GivenTime + "', '" + d.DonationItem + "')";
         DatabaseConnectionClass dcc = new DatabaseConnectionClass();
         dcc.ConnectWithDB();
         int x = dcc.ExecuteSQL(query);
         return(true);
     }
     catch (Exception exa)
     {
         return(false);
     }
 }
        public bool Updater(Employee pas22nd)
        {
            try
            {
                string query2 = "UPDATE EmployeeTable SET EmployeePassword = '******'  WHERE  EmployeeId = '" + pas22nd.EmployeeId + "'";

                DatabaseConnectionClass dcc = new DatabaseConnectionClass();
                dcc.ConnectWithDB();
                int x = dcc.ExecuteSQL(query2);
                return(true);
            }
            catch (Exception exasjuz)
            {
                return(false);
            }
        }
 public bool Updatex(UpcomingEvent xaxxc)
 {
     try
     {
         string query2 = "UPDATE UpcomingEventTable SET Projectname = '" + xaxxc.Projectname + "', Projectarea = '" + xaxxc.Projectarea + "',ProposedDate = '" + xaxxc.ProposedDate + "'  WHERE  ProjectID = '" + xaxxc.ProjectID + "'";
         // string query2 = "UPDATE UpcomingEvent SET Projectname = '" + tas.Projectname + "', Projectarea = "' + tas.Projectarea "'  WHERE  ProposedDate = '" + tas.ProposedDate + "';
         DatabaseConnectionClass dcc = new DatabaseConnectionClass();
         dcc.ConnectWithDB();
         int x = dcc.ExecuteSQL(query2);
         return(true);
     }
     catch (Exception exasz)
     {
         return(false);
     }
 }
 public bool Insert(UpcomingEvent dpa)
 {
     try
     {
         //String combo1 = Convert.ToString(this.DonationTitleCombobox.SelectedItem);  RecieverPhone
         string query = "INSERT into UpcomingEventTable VALUES ('" + dpa.ProjectID + "', '" + dpa.Projectname + "', '" + dpa.Projectarea + "', '" + dpa.ProposedDate + "')";
         DatabaseConnectionClass dcc = new DatabaseConnectionClass();
         dcc.ConnectWithDB();
         int x = dcc.ExecuteSQL(query);
         return(true);
     }
     catch (Exception exfa)
     {
         return(false);
     }
 }
        public List <RecieverPeople> searchRecieverPeople(string text)
        {
            string query13 = "SELECT RecieverId,RecieverName,RecieverArea,RecieverPhoneNo from RecieverPeopleTable WHERE RecieverId LIKE '%" + text + "%'  OR RecieverName LIKE '%" + text + "%'  OR RecieverArea LIKE '%" + text + "%' OR RecieverPhoneNo LIKE '%" + text + "%' ";
            List <RecieverPeople>   modifiedNewList = new List <RecieverPeople>();
            DatabaseConnectionClass dcc             = new DatabaseConnectionClass();

            dcc.ConnectWithDB();
            SqlDataReader sdr = dcc.GetData(query13);

            while (sdr.Read())
            {
                RecieverPeople obj = new RecieverPeople();
                obj.RecieverId      = sdr["RecieverId"].ToString();
                obj.RecieverName    = sdr["RecieverName"].ToString();
                obj.RecieverArea    = sdr["RecieverArea"].ToString();
                obj.RecieverPhoneNo = sdr["RecieverPhoneNo"].ToString();

                modifiedNewList.Add(obj);
            }
            return(modifiedNewList);
        }
        //string query12 = "SELECT * from DonarGivenItemTable WHERE DonarId LIKE '%" + text + "%' OR BkashNo LIKE '%" + text + "%'  DonationId LIKE '%" + text + "%' OR DonationTitle LIKE '%" + text + "%' OR DonarName LIKE '%" + text + "%' OR GivenTime LIKE '%" + text + "%'  OR Donarphone LIKE '%" + text + "%'   OR Donateddollars LIKE '%" + text + "%'";
        public List <DonationByDonar> SearchALLDonarDonation(String text)
        {
            // string query = "SELECT * from RequestedDonationTable WHERE  RecieverPhoneNo LIKE '%" + text + "%' OR RecieverId LIKE '%" + text + "%' OR RecieverGood LIKE '%" + text + "%' OR RecieverName LIKE '%" + text + "%'  OR RecieverArea LIKE '%" + text + "%' OR RequestId LIKE '%" + text + "%'  OR RequestedDate LIKE '%" + text + "%'";


            // string query = "SELECT * from DonarGivenItemTable WHERE DonarId LIKE '%" + text + "%' OR DonarName LIKE '%" + text + "%' OR DonationTitle LIKE '%" + text + "%' OR Donateddollars LIKE '%" + text + "%' OR Donarphone LIKE '%" + text + "%' OR GivenTime LIKE '%" + text + "%' OR DonationId LIKE '%" + text + "%' OR  BkashNo LIKE '%" + text + "%'  ";
            string query = "SELECT * from DonarGivenItemTable WHERE DonarId LIKE '%" + text + "%' OR DonarName LIKE '%" + text + "%'  OR DonationTitle LIKE '%" + text + "%' OR Donateddollars LIKE '%" + text + "%' OR Donarphone LIKE '%" + text + "%' OR GivenTime LIKE '%" + text + "%' OR DonationId LIKE '%" + text + "%'  OR BKashRefferNo LIKE '%" + text + "%' ";



            List <DonationByDonar>  asdxList = new List <DonationByDonar>();
            DatabaseConnectionClass dcc      = new DatabaseConnectionClass();

            dcc.ConnectWithDB();
            SqlDataReader sdr = dcc.GetData(query);

            while (sdr.Read())
            {
                DonationByDonar bez = new DonationByDonar();
                bez.DonarName = sdr["DonarName"].ToString();

                bez.DonationTitle = sdr["DonationTitle"].ToString();

                bez.DonarId        = sdr["DonarId"].ToString();
                bez.Donateddollars = Convert.ToDouble(sdr["Donateddollars"]);
                bez.Donarphone     = sdr["Donarphone"].ToString();

                bez.GivenTime = Convert.ToDateTime(sdr["GivenTime"]);

                bez.DonationId    = sdr["DonationId"].ToString();
                bez.BKashRefferNo = sdr["BKashRefferNo"].ToString();

                asdxList.Add(bez);



                // asdList.Add(a);
            }
            return(asdxList);
        }