Exemplo n.º 1
0
        public ProfileForm(string orgID)
        {
            InitializeComponent();
            webcam = new WebCam();
            webcam.InitializeWebCam(ref imgVideo);
            autocomplete();
            string exists = "";

            try
            {
                exists = Organisation.ListOrganisation().First().Id;
            }
            catch { }
            if (String.IsNullOrEmpty(exists))
            {
                OrgID        = Guid.NewGuid().ToString();
                Helper.orgID = OrgID;
                MemoryStream stream    = ImageToStream(imgCapture.Image, System.Drawing.Imaging.ImageFormat.Jpeg);
                string       fullimage = ImageToBase64(stream);
                _org = new Organisation(OrgID, nameTxt.Text, codeTxt.Text, registrationTxt.Text, contactTxt.Text, addressTxt.Text, tinTxt.Text, vatTxt.Text, emailTxt.Text, nationalityTxt.Text, "", accountTxt.Text, statusCbx.Text, DateTime.Now.AddMonths(3).ToString("dd-MM-yyyy"), fullimage, DateTime.Now.ToString("dd-MM-yyyy H:mm:ss"), DateTime.Now.ToString("dd-MM-yyyy H:mm:ss"), countsTxt.Text, companyCode.Text, "");
                DBConnect.Insert(_org);
            }
            else
            {
                Helper.orgID = exists;
                OrgID        = exists;
                Profile(exists);
            }
            LoadStores();
        }
Exemplo n.º 2
0
        public PatientRegistration()
        {
            //  DB = new DBConnect();
            InitializeComponent();
            webcam = new WebCam();
            webcam.InitializeWebCam(ref imgVideo);
            autocomplete();
            int follow = Global._patients.Count();
            int next   = follow + 1;

            patientNoTxt.Text = Helper.Code + "-" + DateTime.Now.ToString("dd-MM-yyyy") + "/" + next;
        }
Exemplo n.º 3
0
 public ItemDialog()
 {
     InitializeComponent();
     autocomplete();
     autocompleteSupplier();
     autocompleteItem();
     foreach (Departments d in Global._departments)
     {
         departmentCbx.Items.Add(d.Name);
         departmentDictionary.Add(d.Name, d.Id);
     }
     webcam = new WebCam();
     webcam.InitializeWebCam(ref imgVideo);
     ItemID = Guid.NewGuid().ToString();
 }
Exemplo n.º 4
0
        public PractitionerRegistration()
        {
            InitializeComponent();
            webcam = new WebCam();
            webcam.InitializeWebCam(ref imgVideo);
            autocomplete();

            if (Global._roles.Count() < 1)
            {
                string ids   = Guid.NewGuid().ToString();
                Roles  _role = new Roles(ids, "Administrator", "All item pos daily purchases merchandise inventory expenses cash flow suppliers users suppliers catgories transactions ledgers logs profile ", "create update delete log ", DateTime.Now.ToString("dd-MM-yyyy H:mm:ss"), Helper.orgID);
                DBConnect.Insert(_role);
                Global._roles.Add(_role);
            }
            foreach (Roles r in Global._roles)
            {
                rolesCbx.Items.Add(r.Title);
            }
            foreach (Departments d in Global._departments)
            {
                departmentCbx.Items.Add(d.Name);
                departmentDictionary.Add(d.Name, d.Id);
            }
        }
Exemplo n.º 5
0
 public TransactorDialog()
 {
     InitializeComponent();
     webcam = new WebCam();
     webcam.InitializeWebCam(ref imgVideo);
 }