Esempio n. 1
0
        public FRMAddCredit(string topupID, string customerID, string amount, string dateTopup, string customerName)
        {
            InitializeComponent();
            fTopupID = topupID;
            fCustomerID = customerID;
            fCustomerName = customerName;
            fAmount = amount;
            fDateTopup = dateTopup;

            txtValueBaht.Properties.Mask.EditMask = "d";
            txtValueBaht.Properties.Mask.AutoComplete = DevExpress.XtraEditors.Mask.AutoCompleteType.Default;
            txtValueBaht.Properties.Mask.IgnoreMaskBlank = false;
            txtValueBaht.Properties.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.Numeric;
            txtValueBaht.Properties.MaxLength = 4;

            Debug.WriteLine(fTopupID);
            connectDB = new ConMySql();
            messageError = new MessageError();
            txtValueBaht.Text = fAmount;
            if (fCustomerName != "ไม่มีชื่อ")
            {
                txtCustomerName.Text = fCustomerName;
                //txtValueBaht.Select();
            }
            //else
            //{
                txtCustomerName.Select();
            //}
        }
Esempio n. 2
0
        public MainForm()
        {
            InitializeComponent();
            waitingForm.showLoading("กำลังเปิดโปรแกรม");

            helper = new Helper();
            loadSetting();

            ConnectMySql = new ConMySql();
            checkConDB = ConnectMySql.checkConDB;

            if (checkConDB)
            {
                readDataForPort();
                getListPhoneNumber(true, "");
                getListTopup();
                selectProduct();
                getListCredit();
                getListCustomer();
                getListSMS();

                checkPort();
            }

            KeyboardHook.CreateHook(KeyReader);
        }