Example #1
0
        public bool CloseAppointment(int nAppointmentID)
        {
            TblAppointment myAppointment = new TblAppointment();
            myAppointment.NAppointmentId = nAppointmentID;
            myAppointment.SelectOne();
            myAppointment.NStatus = 2;
            myAppointment.Update();

            TblContacts myContact = new TblContacts();
            myContact.UpdateLeadStatus(Convert.ToInt32(myAppointment.NContactId.Value), 0);
            return true;
        }
Example #2
0
        public bool VerifyAppointment(int verifyUserID, string verifyUserPassword, int nAppointmentID)
        {
            TblEmployee verifyUser = new TblEmployee();

            verifyUser.NEmployeeID = verifyUserID;

            verifyUser.SelectOne();

            if (verifyUser.StrPassword.IsNull)
                throw new Exception("Invalid User ID or Password");

            if (verifyUser.StrPassword.Value != verifyUserPassword)
                throw new Exception("Invalid User ID or Password");

            TblAppointment myAppointment = new TblAppointment();
            myAppointment.NAppointmentId = nAppointmentID;
            myAppointment.SelectOne();

            if (!myAppointment.NVerifiedBy.IsNull)
                throw new Exception("This appointment have been verified by other staff with the employee ID : " + myAppointment.NVerifiedBy.Value.ToString());

            myAppointment.NVerifiedBy = verifyUserID;
            //myAppointment.NStatus = 1;
            myAppointment.Update();
            return true;
        }
Example #3
0
 public bool VerifyAppointmentLimit(int nContactID)
 {
     TblAppointment appt = new TblAppointment();
     DataTable table = appt.LoadData("Select COUNT (*) as nCount From TblAppointment where nContactID = @nContactID group by strReceiptNo", new string[] { "@nContactID" }, new object[] { nContactID });
     decimal netTotal = 0;
     if (table.Rows.Count > 0)
         netTotal = ACMS.Convert.ToDecimal(table.Rows[0]["mSubTotal"]);
     return true;
 }