Пример #1
0
        public void TestMethTest_DbCheck_DefaultCunstructorod()
        {
            DbCheck dbCheck1 = new DbCheck(true);
            DbCheck dbCheck2 = new DbCheck(false);

            Assert.AreEqual(true, dbCheck1.Reachable);
            Assert.AreEqual(false, dbCheck2.Reachable);
        }
Пример #2
0
        private static User ReaderDataUserName(MySqlDataReader reader)
        {
            User objDD = new User();

            objDD.UserID   = DbCheck.IsValidInt(reader["UserID"]);
            objDD.FullName = DbCheck.IsValidString(reader["fullname"]);

            return(objDD);
        }
Пример #3
0
        private static DonationType ReaderDataDonationType(MySqlDataReader reader)
        {
            DonationType objDD = new DonationType();

            objDD.DonationTypeId = DbCheck.IsValidInt(reader["DonationTypeId"]);
            objDD.TypeName       = DbCheck.IsValidString(reader["TypeName"]);

            return(objDD);
        }
Пример #4
0
        private static UserType ReaderDataUserType(MySqlDataReader reader)
        {
            UserType objDD = new UserType();

            objDD.typeid   = DbCheck.IsValidInt(reader["typeid"]);
            objDD.typename = DbCheck.IsValidString(reader["typename"]);

            return(objDD);
        }
Пример #5
0
        private static DistributorRequest ReaderDataDistributorRequest(MySqlDataReader reader)
        {
            DistributorRequest objDD = new DistributorRequest();

            objDD.RequestID      = DbCheck.IsValidInt(reader["RequestID"]);
            objDD.NumberOfPeople = DbCheck.IsValidInt(reader["NumberOfPeople"]);
            objDD.RequestDate    = DbCheck.IsValidDateTime(reader["RequestDate"]);
            objDD.RequestStatus  = DbCheck.IsValidString(reader["RequestStatus"]);
            objDD.UserID         = DbCheck.IsValidInt(reader["UserId"]);
            return(objDD);
        }
Пример #6
0
        private static UserDonation ReaderDataUserDonation(MySqlDataReader reader)
        {
            UserDonation objDD = new UserDonation();

            objDD.DonationID     = DbCheck.IsValidInt(reader["donationid"]);
            objDD.DonationStatus = DbCheck.IsValidString(reader["DonationStatus"]);
            objDD.RequestDate    = DbCheck.IsValidDateTime(reader["RequestDate"]);
            objDD.DonationTypeId = DbCheck.IsValidInt(reader["DonationTypeId"]);
            objDD.UserId         = DbCheck.IsValidInt(reader["UserId"]);
            return(objDD);
        }
Пример #7
0
        private static RiderDonation ReaderDataRiderDonation(MySqlDataReader reader)
        {
            RiderDonation objRD = new RiderDonation();

            objRD.RIDEID       = DbCheck.IsValidInt(reader["rideid"]);
            objRD.RIDERID      = DbCheck.IsValidInt(reader["RiderID"]);
            objRD.ASSIGNEDDATE = DbCheck.IsValidDateTime(reader["assigndate"]);
            objRD.DONATIONID   = DbCheck.IsValidInt(reader["donationid"]);

            return(objRD);
        }
Пример #8
0
        private static RiderDeliver ReaderDataRiderDeliver(MySqlDataReader reader)
        {
            RiderDeliver objRD = new RiderDeliver();

            objRD.RIDEID       = DbCheck.IsValidInt(reader["rideid"]);
            objRD.RIDERID      = DbCheck.IsValidInt(reader["RiderID"]);
            objRD.ASSIGNEDDATE = DbCheck.IsValidDateTime(reader["assigndate"]);
            objRD.ACCEPTID     = DbCheck.IsValidInt(reader["acceptid"]);

            return(objRD);
        }
Пример #9
0
        private static Admin ReaderDataAdmin(MySqlDataReader reader)
        {
            Admin objAdmin = new Admin();

            objAdmin.ADMINID   = DbCheck.IsValidInt(reader["Adminid"]);
            objAdmin.FULLNAME  = DbCheck.IsValidString(reader["fullname"]);
            objAdmin.EMAIL     = DbCheck.IsValidString(reader["email"]);
            objAdmin.APASSWORD = DbCheck.IsValidString(reader["apassword"]);
            objAdmin.USERNAME  = DbCheck.IsValidString(reader["username"]);
            return(objAdmin);
        }
Пример #10
0
        private static DonationDetails ReaderDataDonationDet(MySqlDataReader reader)
        {
            DonationDetails objDD = new DonationDetails();

            objDD.DETID      = DbCheck.IsValidInt(reader["detid"]);
            objDD.ITEMNAME   = DbCheck.IsValidString(reader["itemname"]);
            objDD.QUANTITY   = DbCheck.IsValidInt(reader["quantity"]);
            objDD.DONATIONID = DbCheck.IsValidInt(reader["donationid"]);

            return(objDD);
        }
Пример #11
0
        private static Rider ReaderDataRider(MySqlDataReader reader)
        {
            Rider objRider = new Rider();

            objRider.RIDERID                   = DbCheck.IsValidInt(reader["riderid"]);
            objRider.FULLNAME                  = DbCheck.IsValidString(reader["fullname"]);
            objRider.CNIC                      = DbCheck.IsValidString(reader["cnic"]);
            objRider.CONTACTNUMBER             = DbCheck.IsValidString(reader["contactnumber"]);
            objRider.ADDRESS                   = DbCheck.IsValidString(reader["address"]);
            objRider.VEHICLEREGISTRATIONNUMBER = DbCheck.IsValidString(reader["vehicleregistrationnumber"]);

            return(objRider);
        }
Пример #12
0
        private static UserDonation ReaderDataPending(MySqlDataReader reader)
        {
            UserDonation objDD = new UserDonation();

            objDD.DonationID     = DbCheck.IsValidInt(reader["donationid"]);
            objDD.DonationStatus = DbCheck.IsValidString(reader["DonationStatus"]);
            objDD.RequestDate    = DbCheck.IsValidDateTime(reader["RequestDate"]);
            objDD.DonationType   = DbCheck.IsValidString(reader["typename"]);

            objDD.UserId       = DbCheck.IsValidInt(reader["userid"]);
            objDD.UserFullName = DbCheck.IsValidString(reader["fullname"]);

            return(objDD);
        }
Пример #13
0
        private static User ReaderDataUser(MySqlDataReader reader)
        {
            User objDD = new User();

            objDD.UserID     = DbCheck.IsValidInt(reader["UserID"]);
            objDD.FullName   = DbCheck.IsValidString(reader["fullname"]);
            objDD.Username   = DbCheck.IsValidString(reader["username"]);
            objDD.UPassword  = DbCheck.IsValidString(reader["upassword"]);
            objDD.CNIC       = DbCheck.IsValidString(reader["cnic"]);
            objDD.Contact    = DbCheck.IsValidString(reader["Contact"]);
            objDD.Address    = DbCheck.IsValidString(reader["address"]);
            objDD.UserTypeId = DbCheck.IsValidInt(reader["usertypeid"]);
            objDD.Email      = DbCheck.IsValidString(reader["email"]);



            return(objDD);
        }