Esempio n. 1
0
        private void customerCbx_SelectedIndexChanged(object sender, EventArgs e)
        {
            insuranceInfoTxt.Text  = "";
            subscriberInfoTxt.Text = "";
            try
            {
                CustomerID             = CustomerDictionary[customerCbx.Text];
                c                      = new Customer();//.Select(ItemID);
                c                      = Customer.Select(CustomerID);
                subscriberInfoTxt.Text = "Name: " + c.Name + "\t DOB: " + c.Dob + " \r\n Address: " + c.Address + "\r\n City/state: " + c.City + " " + c.State + "\t Zip: " + c.Zip + " \r\n  Phone: " + c.Contact + "\t Soc.Sec.#: " + c.Ssn + "\t Gender: " + c.Gender;
                System.Drawing.Image  img = Helper.Base64ToImage(c.Image);
                System.Drawing.Bitmap bmp = new System.Drawing.Bitmap(img);
                cusPbx.Image = bmp;
                GraphicsPath gp = new GraphicsPath();
                gp.AddEllipse(cusPbx.DisplayRectangle);
                cusPbx.Region   = new Region(gp);
                cusPbx.SizeMode = PictureBoxSizeMode.StretchImage;
            }
            catch { }

            AutoCompletePractitioner(CustomerID);
            AutoCompleteCoverage(CustomerID);
            //try
            //{
            string Q = "SELECT * FROM coverage WHERE customerID='" + CustomerID + "' ";

            foreach (Coverage c in Coverage.List(Q))
            {
                insuranceInfoTxt.Text = insuranceInfoTxt.Text + "Name: " + c.Name + "\t ID# : " + c.No + " " + "\t Type: " + c.Type + "\r\n ";
            }
            //}
            //catch { }
        }
Esempio n. 2
0
        private void LoadCase(string id)
        {
            try
            {
                //CustomerID = CustomerDictionary[customerCbx.Text];
                c = new Customer();                //.Select(ItemID);
                c = Customer.Select(CustomerID);
                subscriberInfoTxt.Text = "Name: " + c.Name + "\t DOB: " + c.Dob + " \r\n Address: " + c.Address + "\r\n City/state: " + c.City + " " + c.State + "\t Zip: " + c.Zip + " \r\n  Phone: " + c.Contact + "\t Soc.Sec.#: " + c.Ssn;

                System.Drawing.Image  img = Helper.Base64ToImage(c.Image);
                System.Drawing.Bitmap bmp = new System.Drawing.Bitmap(img);
                cusPbx.Image = bmp;
                GraphicsPath gp = new GraphicsPath();
                gp.AddEllipse(cusPbx.DisplayRectangle);
                cusPbx.Region   = new Region(gp);
                cusPbx.SizeMode = PictureBoxSizeMode.StretchImage;
            }
            catch { }
            //try
            //{
            string Q = "SELECT * FROM coverage WHERE customerID='" + CustomerID + "' ";

            foreach (Coverage c in Coverage.List(Q))
            {
                insuranceInfoTxt.Text = insuranceInfoTxt.Text + "\r\n " + c.Type + "\r\n" + "Name: " + c.Name + "\t ID# : " + c.No + " \r\n  " + " \r\n  Type: " + c.Type;
            }

            //}
            //catch { }

            try
            {
                Practitioner c = new Practitioner();                //.Select(ItemID);
                c            = Practitioner.Select(PractitionerID);
                userTxt.Text = "Name: " + c.Name + "\t Speciality" + c.Speciality + " \r\n Address: " + c.Address + "\r\n City/state: " + c.City + " " + c.State + "\t Zip: " + c.Zip + " \r\n  Phone: " + c.Contact + "\t";

                System.Drawing.Image  img = Helper.Base64ToImage(c.Image);
                System.Drawing.Bitmap bmp = new System.Drawing.Bitmap(img);
                userPbx.Image = bmp;
                GraphicsPath gp = new GraphicsPath();
                gp.AddEllipse(cusPbx.DisplayRectangle);
                userPbx.Region   = new Region(gp);
                userPbx.SizeMode = PictureBoxSizeMode.StretchImage;
            }
            catch { }
            GenericCollection.caseTransactions.Clear();
            string Qs = "SELECT * FROM casetransaction WHERE caseID = '" + noTxt.Text + "'";

            foreach (CaseTransaction j in CaseTransaction.List(Qs))
            {
                //try
                //{

                CaseTransaction t = new CaseTransaction(j.Id, j.Date, j.No, j.ItemID, j.CaseID, j.DeliveryID, j.Qty, j.Cost, j.Units, j.Total, j.Tax, j.Coverage, j.Self, j.Payable, j.Limits, j.Setting, j.Period, j.Height, j.Weight, j.Instruction, j.Created, "false", Helper.CompanyID);
                GenericCollection.caseTransactions.Add(t);
                //}
                //catch { }
            }
            LoadCaseTransactions();
        }
Esempio n. 3
0
 public static void Coverages()
 {
     GenericCollection.coverage.Clear();
     f = Coverage.List("SELECT * FROM coverage ");
     ProcessWindow._Form1.FeedBack("Downloading Coverage... " + f.Count);
     foreach (var h in f)
     {
         Coverage p = new Coverage(h.Id, h.CustomerID, h.Name, h.Type, h.Category, h.No, DateTime.Now.ToString("dd-MM-yyyy H:m:s"), "true", Helper.CompanyID, h.Expires);
         ProcessWindow._Form1.FeedBack("Downloading ... " + h.Id.ToString());
         Coverage u = new Coverage(h.Id, h.CustomerID, h.Name, h.Type, h.Category, h.No, DateTime.Now.ToString("dd-MM-yyyy H:m:s"), "true", Helper.CompanyID, h.Expires);
         GenericCollection.coverage.Add(u);
     }
     ProcessWindow._Form1.FeedBack("Downloading Coverage Complete");
 }
Esempio n. 4
0
 public static void Insurances()
 {
     f = Coverage.List("SELECT * FROM coverage ");
     AdvancedForm._Form1.FeedBack("Uploading Insurance... " + f.Count);
     foreach (var h in f)
     {
         string Query = "DELETE from coverage WHERE id ='" + h.Id + "'";
         MySQL.Query(Query);
         Coverage p = new Coverage(h.Id, h.CustomerID, h.Name, h.Type, h.Category, h.No, DateTime.Now.ToString("dd-MM-yyyy H:m:s"), "true", Helper.CompanyID, h.Expires);
         if (MySQL.Insert(p) != "")
         {
             AdvancedForm._Form1.FeedBack("Uploading ... " + h.Id.ToString());
             Coverage u = new Coverage(h.Id, h.CustomerID, h.Name, h.Type, h.Category, h.No, DateTime.Now.ToString("dd-MM-yyyy H:m:s"), "true", Helper.CompanyID, h.Expires);
             DBConnect.UpdateMySql(u, h.Id);
             AdvancedForm._Form1.FeedBack("Updating .. " + h.Id.ToString());
         }
     }
     AdvancedForm._Form1.FeedBack("Uploading Insurance Complete");
 }
Esempio n. 5
0
        private void AutoCompleteCoverage()
        {
            AutoCompleteStringCollection AutoItem = new AutoCompleteStringCollection();

            CoverDictionary.Clear();
            string Q = "SELECT * FROM coverage WHERE customerID = '" + CustomerID + "' ";

            foreach (Coverage c in Coverage.List(Q))
            {
                AutoItem.Add((c.Name));

                if (!CoverDictionary.ContainsKey(c.Name))
                {
                    CoverDictionary.Add(c.Name, c.Id);
                    CoverageCbx.Items.Add(c.Name);
                }
            }
            //productTxt.AutoCompleteMode = AutoCompleteMode.Suggest;
            //productTxt.AutoCompleteSource = AutoCompleteSource.CustomSource;
            //productTxt.AutoCompleteCustomSource = AutoItem;
        }
Esempio n. 6
0
        private void LoadEdit(string id)
        {
            submitBtn.Visible = false;
            OrderID           = id;
            o              = new Orders();//.Select(UsersID);
            o              = Orders.Select(OrderID);
            CustomerID     = o.CustomerID;
            CaseID         = o.No;
            CustomerID     = o.CustomerID;
            PractitionerID = o.PractitionerID;

            noTxt.Text            = o.No;
            orderDateTxt.Text     = Convert.ToDateTime(o.OrderDate).ToString("dd-MM-yyyy");
            orderTimeTxt.Text     = Convert.ToDateTime(o.OrderTime).ToString("dd-MM-yyyy");
            recievedCbx.Text      = o.OrderBy;
            dispenseDateTxt.Text  = Convert.ToDateTime(o.DispenseDate).ToString("dd-MM-yyyy");
            dispensedTimeTxt.Text = Convert.ToDateTime(o.DispenseTime).ToString("dd-MM-yyyy");
            dispensedCbx.Text     = o.DispenseBy;
            recievedCbx.Text      = o.OrderBy;
            diagnosisTxt.Text     = o.Diagnosis;
            surgeryTxt.Text       = o.Surgery;
            typeCbx.Text          = o.CustomerType;
            setupDate.Text        = Convert.ToDateTime(o.SetupDate).ToString("dd-MM-yyyy");

            neededDateTxt.Text = Convert.ToDateTime(o.DateNeeded).ToString("dd-MM-yyyy");
            roomTxt.Text       = o.RoomNo;
            if (o.Hospital == "Yes")
            {
                hospitalChk.Checked = true;
            }
            else
            {
                hospitalChk.Checked = false;
            }
            if (o.PreopRm == "Yes")
            {
                preRmChk.Checked = true;
            }
            else
            {
                preRmChk.Checked = false;
            }
            if (o.PostopRm == "Yes")
            {
                postRmChk.Checked = true;
            }
            else
            {
                postRmChk.Checked = false;
            }
            if (o.Home == "Yes")
            {
                homeChk.Checked = true;
            }
            else
            {
                homeChk.Checked = false;
            }
            if (o.PreopHome == "Yes")
            {
                preHomeChk.Checked = true;
            }
            else
            {
                preHomeChk.Checked = false;
            }
            if (o.Clinic == "Yes")
            {
                clinicChk.Checked = true;
            }
            else
            {
                clinicChk.Checked = false;
            }
            if (o.Facility == "Yes")
            {
                facilityChk.Checked = true;
            }
            else
            {
                facilityChk.Checked = false;
            }
            if (o.Notified == "Yes")
            {
                notifiedChk.Checked = true;
            }
            else
            {
                notifiedChk.Checked = false;
            }
            if (o.Authorised == "Yes")
            {
                authorisationChk.Checked = true;
            }
            else
            {
                authorisationChk.Checked = false;
            }
            if (o.Insurance == "Yes")
            {
                insuranceChk.Checked = true;
            }
            else
            {
                insuranceChk.Checked = false;
            }
            if (o.Contacted == "Yes")
            {
                contactedChk.Checked = true;
            }
            else
            {
                contactedChk.Checked = false;
            }
            if (o.Sent == "Yes")
            {
                cmnSentChk.Checked = true;
            }
            else
            {
                cmnSentChk.Checked = false;
            }
            if (o.Returned == "Yes")
            {
                cmnReturnedChk.Checked = true;
            }
            else
            {
                cmnReturnedChk.Checked = false;
            }
            dateSentTxt.Text     = Convert.ToDateTime(o.DateSent).ToString("dd-MM-yyyy");
            dateReturnedTxt.Text = Convert.ToDateTime(o.DateReturned).ToString("dd-MM-yyyy");
            otherTxt.Text        = o.Other;
            try
            {
                PractitionerID = o.PractitionerID;
                Practitioner c = new Practitioner();                //.Select(ItemID);
                c            = Practitioner.Select(PractitionerID);
                userTxt.Text = "Name: " + c.Name + "\t Speciality" + c.Speciality + " \r\n Address: " + c.Address + "\r\n City/state: " + c.City + " " + c.State + "\t Zip: " + c.Zip + " \r\n  Phone: " + c.Contact + "\t";

                System.Drawing.Image  img = Helper.Base64ToImage(c.Image);
                System.Drawing.Bitmap bmp = new System.Drawing.Bitmap(img);
                userPbx.Image = bmp;
                GraphicsPath gp = new GraphicsPath();
                gp.AddEllipse(cusPbx.DisplayRectangle);
                userPbx.Region   = new Region(gp);
                userPbx.SizeMode = PictureBoxSizeMode.StretchImage;
            }
            catch { }

            otherTxt.Text        = o.Other;
            recievedCbx.Text     = o.OrderBy;
            dispensedCbx.Text    = o.DispenseBy;
            dispenseDateTxt.Text = Convert.ToDateTime(o.DispenseDate).ToString();
            diagnosisTxt.Text    = o.Diagnosis;
            surgeryTxt.Text      = o.Surgery;
            otherTxt.Text        = o.Other;


            try
            {
                //CustomerID = CustomerDictionary[customerCbx.Text];
                c = new Customer();                //.Select(ItemID);
                c = Customer.Select(o.CustomerID);
                subscriberInfoTxt.Text = "Name: " + c.Name + "\t DOB: " + c.Dob + " \r\n Address: " + c.Address + "\r\n City/state: " + c.City + " " + c.State + "\t Zip: " + c.Zip + " \r\n  Phone: " + c.Contact + "\t Soc.Sec.#: " + c.Ssn;

                System.Drawing.Image  img = Helper.Base64ToImage(c.Image);
                System.Drawing.Bitmap bmp = new System.Drawing.Bitmap(img);
                cusPbx.Image = bmp;
                GraphicsPath gp = new GraphicsPath();
                gp.AddEllipse(cusPbx.DisplayRectangle);
                cusPbx.Region   = new Region(gp);
                cusPbx.SizeMode = PictureBoxSizeMode.StretchImage;
            }
            catch { }
            try
            {
                string Q = "SELECT * FROM coverage WHERE customerID = '" + o.CustomerID + "' ";
                foreach (Coverage c in Coverage.List(Q))
                {
                    insuranceInfoTxt.Text = insuranceInfoTxt.Text + "\r\n" + "Name: " + c.Name + "\t ID# : " + c.No + " \r\n  " + " \r\n  Type: " + c.Type;
                }
            }
            catch { }
            LoadCase(o.No);
        }
Esempio n. 7
0
        private void LoadEdit(string id)
        {
            submitBtn.Visible = false;
            ID = id;
            i  = new Certificate();           //.Select(UsersID);
            try
            {
                i = Certificate.Select(id);
            }
            catch
            {
                MessageBox.Show("Certificate information not yet saved");
            }
            noTxt.Text          = i.No;
            idTxt.Text          = i.PatientNo;
            patientNameTxt.Text = i.CusName;
            dobTxt.Text         = i.CusDob;
            contactTxt.Text     = i.CusPhone;

            providerIDTxt.Text    = i.PracID;
            providerNameTxt.Text  = i.ProvName;
            providerUserTxt.Text  = i.PracName;
            providerPhoneTxt.Text = i.ProvPhone;

            if (i.Mobility == "true")
            {
                mobYesBn.Checked = true;
            }
            if (i.Mobility == "false")
            {
                mobNoBn.Checked = true;
            }
            if (i.Endurance == "true")
            {
                enduranceBn.Checked = true;
            }
            if (i.Endurance == "false")
            {
                enduranceNoBn.Checked = true;
            }
            if (i.Activity == "true")
            {
                activityBn.Checked = true;
            }
            if (i.Activity == "false")
            {
                activityNoBn.Checked = true;
            }
            if (i.Skin == "true")
            {
                skinBn.Checked = true;
            }
            if (i.Skin == "false")
            {
                skinNoBn.Checked = true;
            }
            if (i.Respiration == "true")
            {
                respirationBn.Checked = true;
            }
            if (i.Respiration == "false")
            {
                respirationNoBn.Checked = true;
            }
            if (i.Adl == "true")
            {
                adlBn.Checked = true;
            }
            if (i.Adl == "false")
            {
                adlNoBn.Checked = true;
            }
            if (i.Speech == "true")
            {
                speechBn.Checked = true;
            }
            if (i.Speech == "false")
            {
                speechNoBn.Checked = true;
            }
            if (i.Nutritional == "true")
            {
                nutritionBn.Checked = true;
            }
            if (i.Nutritional == "false")
            {
                nutritionNoBn.Checked = true;
            }
            if (i.Source == "sole")
            {
                sourceSoleBn.Checked = true;
            }
            else if (i.Source == "primary")
            {
                primarySourceBn.Checked = true;
            }
            heightTxt.Text = i.Height.ToString();
            weightTxt.Text = i.Weight.ToString();
            dateTxt.Text   = i.Date;
            if (i.Suitable == "true")
            {
                suitableBn.Checked = true;
            }
            if (i.Suitable == "false")
            {
                suitableNoBn.Checked = true;
            }
            if (i.Face == "Yes")
            {
                faceYesBn.Checked = true;
            }
            else if (i.Face == "No")
            {
                faceNoBn.Checked = true;
            }
            else if (i.Face == "N/A")
            {
                faceNaBn.Checked = true;
            }

            completedTxt.Text    = i.Practionercompleted;
            practitionerTxt.Text = i.PracName;
            pracIDTxt.Text       = i.PracID;
            signatureTxt.Text    = i.PracSign;
            dateTxt.Text         = i.SignDate;
            phoneTxt.Text        = i.PracPhone;
            additionalTxt.Text   = i.Additional;

            try
            {
                //CustomerID = CustomerDictionary[customerCbx.Text];
                c = new Customer();                //.Select(ItemID);
                c = Customer.Select(i.CusID);
                subscriberInfoTxt.Text = "Name: " + c.Name + "\t DOB: " + c.Dob + " \r\n Address: " + c.Address + "\r\n City/state: " + c.City + " " + c.State + "\t Zip: " + c.Zip + " \r\n  Phone: " + c.Contact + "\t Soc.Sec.#: " + c.Ssn;

                System.Drawing.Image  img = Helper.Base64ToImage(c.Image);
                System.Drawing.Bitmap bmp = new System.Drawing.Bitmap(img);
                cusPbx.Image = bmp;
                GraphicsPath gp = new GraphicsPath();
                gp.AddEllipse(cusPbx.DisplayRectangle);
                cusPbx.Region   = new Region(gp);
                cusPbx.SizeMode = PictureBoxSizeMode.StretchImage;
            }
            catch { }
            try
            {
                string Qw = "SELECT * FROM coverage WHERE customerID = '" + i.CusID + "' ";
                foreach (Coverage c in Coverage.List(Qw))
                {
                    // insuranceInfoTxt.Text = insuranceInfoTxt.Text + "\r\n" + "Name: " + c.Name + "\t ID# : " + c.No + " \r\n  " + " \r\n  Type: " + c.Type;
                }
            }
            catch { }
        }
Esempio n. 8
0
        private void LoadEdit(string no)
        {
            submitBtn.Visible = false;

            i = new Instruction();            //.Select(UsersID);
            i = Instruction.SelectNo(no);

            CustomerID = i.CustomerID;
            noTxt.Text = no;

            if (i.Initial == "Yes")
            {
                initialChk.Checked = true;
            }
            else
            {
                initialChk.Checked = false;
            }
            if (i.Followup == "Yes")
            {
                followChk.Checked = true;
            }
            else
            {
                followChk.Checked = false;
            }
            if (i.Delivered == "Yes")
            {
                deliveredChk.Checked = true;
            }
            else
            {
                deliveredChk.Checked = false;
            }
            if (i.Safety == "Yes")
            {
                safetyChk.Checked = true;
            }
            else
            {
                safetyChk.Checked = false;
            }
            if (i.Pathways == "Yes")
            {
                pathChk.Checked = true;
            }
            else
            {
                pathChk.Checked = false;
            }
            if (i.Operation == "Yes")
            {
                operationChk.Checked = true;
            }
            else
            {
                operationChk.Checked = false;
            }
            if (i.Environment == "Yes")
            {
                environmentChk.Checked = true;
            }
            else
            {
                environmentChk.Checked = false;
            }
            if (i.Rugs == "Yes")
            {
                rugsChk.Checked = true;
            }
            else
            {
                rugsChk.Checked = false;
            }
            if (i.Fire == "Yes")
            {
                fireChk.Checked = true;
            }
            else
            {
                fireChk.Checked = false;
            }
            if (i.Cord == "Yes")
            {
                cordChk.Checked = true;
            }
            else
            {
                cordChk.Checked = false;
            }
            if (i.Issues == "Yes")
            {
                issuesChk.Checked = true;
            }
            else
            {
                issuesChk.Checked = false;
            }
            if (i.Electrical == "Yes")
            {
                electricalChk.Checked = true;
            }
            else
            {
                electricalChk.Checked = false;
            }
            if (i.Inouts == "Yes")
            {
                inoutChk.Checked = true;
            }
            else
            {
                inoutChk.Checked = false;
            }

            if (i.Understand == "Yes")
            {
                understandChk.Checked = true;
            }
            else
            {
                understandChk.Checked = false;
            }
            if (i.Demonstration == "Yes")
            {
                demonChk.Checked = true;
            }
            else
            {
                demonChk.Checked = false;
            }
            if (i.Caregiver == "Yes")
            {
                caregiverChk.Checked = true;
            }
            else
            {
                caregiverChk.Checked = false;
            }

            if (i.Appropriate == "Yes")
            {
                yesRadioBtn.Checked = true;
            }
            else
            {
                noRadioBtn.Checked = false;
            }

            if (i.Ambulatory == "Yes")
            {
                ambChk.Checked = true;
            }
            else
            {
                ambChk.Checked = false;
            }
            if (i.Bath == "Yes")
            {
                bathChk.Checked = true;
            }
            else
            {
                bathChk.Checked = false;
            }
            if (i.Beds == "Yes")
            {
                bedChk.Checked = true;
            }
            else
            {
                bedChk.Checked = false;
            }
            if (i.Seat == "Yes")
            {
                seatChk.Checked = true;
            }
            else
            {
                seatChk.Checked = false;
            }
            if (i.Scooter == "Yes")
            {
                scootChk.Checked = true;
            }
            else
            {
                scootChk.Checked = false;
            }
            if (i.Manual == "Yes")
            {
                manualChk.Checked = true;
            }
            else
            {
                manualChk.Checked = false;
            }
            if (i.Power == "Yes")
            {
                powerChk.Checked = true;
            }
            else
            {
                powerChk.Checked = false;
            }
            if (i.Handling == "Yes")
            {
                handlingChk.Checked = true;
            }
            else
            {
                handlingChk.Checked = false;
            }
            equipmentOtherTxt.Text = i.EquipmentOther;

            if (i.Rights == "Yes")
            {
                rightsChk.Checked = true;
            }
            else
            {
                rightsChk.Checked = false;
            }
            if (i.Available == "Yes")
            {
                availChk.Checked = true;
            }
            else
            {
                availChk.Checked = false;
            }
            if (i.Privacy == "Yes")
            {
                privacyChk.Checked = true;
            }
            else
            {
                privacyChk.Checked = false;
            }
            if (i.Standards == "Yes")
            {
                standardChk.Checked = true;
            }
            else
            {
                standardChk.Checked = false;
            }
            if (i.Instructions == "Yes")
            {
                instructionChk.Checked = true;
            }
            else
            {
                instructionChk.Checked = false;
            }
            if (i.Delivered == "Yes")
            {
                deliveredChk.Checked = true;
            }
            else
            {
                deliveredChk.Checked = false;
            }
            if (i.Cleaning == "Yes")
            {
                cleanChk.Checked = true;
            }
            else
            {
                cleanChk.Checked = false;
            }
            if (i.Letter == "Yes")
            {
                letterChk.Checked = true;
            }
            else
            {
                letterChk.Checked = false;
            }
            if (i.Complaint == "Yes")
            {
                complaintChk.Checked = true;
            }
            else
            {
                complaintChk.Checked = false;
            }
            if (i.Warranty == "Yes")
            {
                warrantyChk.Checked = true;
            }
            else
            {
                warrantyChk.Checked = false;
            }
            if (i.Instructions == "Yes")
            {
                instructionChk.Checked = true;
            }
            else
            {
                instructionChk.Checked = false;
            }
            if (i.Aob == "Yes")
            {
                aobChk.Checked = true;
            }
            else
            {
                aobChk.Checked = false;
            }

            if (i.Visit == "Yes")
            {
                visitChk.Checked = true;
            }
            else
            {
                visitChk.Checked = false;
            }
            if (i.Phone == "Yes")
            {
                phoneChk.Checked = true;
            }
            else
            {
                phoneChk.Checked = false;
            }

            signatureTxt.Text      = i.PatientSign;
            userCbx.Text           = i.Employee;
            userSignatureTxt.Text  = i.EmployeeSign;
            limitTxt.Text          = i.PhysicalLimit;
            safetyOtherTxt.Text    = i.SafetyOther;
            kinContactTxt.Text     = i.KinContact;
            kinCbx.Text            = i.KinName;
            representativeTxt.Text = i.Representative;
            additionNotesTxt.Text  = i.Notes;

            otherSignatureCbx.Text = i.OtherSign;
            kinCbx.Text            = i.KinName;
            kinCbx_SelectedIndexChanged(null, null);
            reasonTxt.Text        = i.Reason;
            userSignatureTxt.Text = i.UserSignature;
            dateTxt.Text          = i.Date;
            try
            {
                //CustomerID = CustomerDictionary[customerCbx.Text];
                c = new Customer();                //.Select(ItemID);
                c = Customer.Select(i.CustomerID);
                subscriberInfoTxt.Text = "Name: " + c.Name + "\t DOB: " + c.Dob + " \r\n Address: " + c.Address + "\r\n City/state: " + c.City + " " + c.State + "\t Zip: " + c.Zip + " \r\n  Phone: " + c.Contact + "\t Soc.Sec.#: " + c.Ssn;

                System.Drawing.Image  img = Helper.Base64ToImage(c.Image);
                System.Drawing.Bitmap bmp = new System.Drawing.Bitmap(img);
                cusPbx.Image = bmp;
                GraphicsPath gp = new GraphicsPath();
                gp.AddEllipse(cusPbx.DisplayRectangle);
                cusPbx.Region   = new Region(gp);
                cusPbx.SizeMode = PictureBoxSizeMode.StretchImage;
            }
            catch { }
            try
            {
                string Q = "SELECT * FROM coverage WHERE customerID = '" + i.CustomerID + "' ";
                foreach (Coverage c in Coverage.List(Q))
                {
                    // insuranceInfoTxt.Text = insuranceInfoTxt.Text + "\r\n" + "Name: " + c.Name + "\t ID# : " + c.No + " \r\n  " + " \r\n  Type: " + c.Type;
                }
            }
            catch { }
        }
Esempio n. 9
0
        public void LoadData()
        {
            // create and execute query
            t = new DataTable();
            t.Columns.Add(new DataColumn("Select", typeof(bool)));
            t.Columns.Add("id");
            t.Columns.Add("uriCus");
            t.Columns.Add(new DataColumn("ImgCus", typeof(Bitmap)));//1
            t.Columns.Add("Patient");
            t.Columns.Add("Company");
            t.Columns.Add("Type");
            t.Columns.Add("No");

            t.Columns.Add("Created");
            t.Columns.Add(new DataColumn("Delete", typeof(Image)));
            t.Columns.Add("customerID");


            Image delete = new Bitmap(Properties.Resources.Server_Delete_16);

            Bitmap b = new Bitmap(50, 50);

            using (Graphics g = Graphics.FromImage(b))
            {
                g.DrawString("Loading...", this.Font, new SolidBrush(Color.Black), 0f, 0f);
            }


            foreach (Coverage c in Coverage.List())
            {
                string cus      = "";
                string imageCus = "";

                try { cus = GenericCollection.customers.Where(r => r.Id == c.CustomerID).First().Name; } catch { }
                try { imageCus = GenericCollection.customers.Where(r => r.Id == c.CustomerID).First().Image; } catch { }
                try
                {
                    t.Rows.Add(new object[] { "false", c.Id, imageCus as string, b, cus, c.Name, c.Type, c.No, c.Created, delete, c.CustomerID });
                }
                catch (Exception m)
                {
                    MessageBox.Show("" + m.Message);
                    Helper.Exceptions(m.Message, "Viewing Insurance {each schedule list }" + cus);
                }
            }

            dtGrid.DataSource = t;
            ThreadPool.QueueUserWorkItem(delegate
            {
                foreach (DataRow row in t.Rows)
                {
                    try
                    {
                        Image img = Helper.Base64ToImage(row["uriCus"].ToString().Replace('"', ' ').Trim());
                        System.Drawing.Bitmap bmp = new System.Drawing.Bitmap(img);
                        Bitmap bps     = new Bitmap(bmp, 50, 50);
                        Image dstImage = Helper.CropToCircle(bps, Color.White);
                        row["ImgCus"]  = dstImage;
                    }
                    catch
                    {
                    }
                }
            });
            dtGrid.AllowUserToAddRows = false;
            //  dtGrid.Columns["Customer"].DefaultCellStyle.BackColor = Color.LightGreen;
            dtGrid.Columns["Company"].DefaultCellStyle.BackColor = Color.LightBlue;
            // dtGrid.Columns["ImgCus"].DefaultCellStyle.BackColor =  Color.LightGreen;

            dtGrid.Columns["id"].Visible         = false;
            dtGrid.Columns["customerID"].Visible = false;
            dtGrid.Columns["uriCus"].Visible     = false;
        }