コード例 #1
0
        private void InitializeComponent2()
        {
//            string logo;

            mySQLClass mySQL = new mySQLClass();

            label1.Text = gVariable.programTitle;

            switch (gVariable.CompanyIndex)
            {
            case gVariable.ZIHUA_ENTERPRIZE:
                gVariable.DBHeadString = "h";
                break;

            default:
                break;
            }
            BackgroundImage = Image.FromFile(gVariable.backgroundArray[gVariable.CompanyIndex]);
            this.Icon       = new Icon(gVariable.logoInTitleArray[gVariable.CompanyIndex]);
        }
コード例 #2
0
        public void save_cashdenomination(cls_user cashier)
        {
            //type:
            //1 - beginning
            //2 - pickup
            //3 - ending

            mySQLClass mysqlclass = new mySQLClass();

            string branchid   = cls_globalvariables.BranchCode;
            string terminalno = cls_globalvariables.terminalno_v;
            long   userwid    = cashier.getsyncid();
            long   SyncId     = mysqlclass.GetAndInsertNextSyncId("poscashdenomination");

            if (this.get_type() == 3)
            {
                mySQLFunc.setdb(@"UPDATE `poscashdenomination` SET `type` = 2 
                                    WHERE `type` = 3 AND CAST(`datecreated` AS DATE) = CAST(NOW() AS DATE)
                                        AND `branchid` = " + branchid + @" AND `terminalno` = " + terminalno);
            }

            string sSQL = @"UPDATE `poscashdenomination` SET 
               `branchid` = " + branchid + ", `terminalno` = " + terminalno +
                          ", `userid` = " + userwid + ", `datecreated` = NOW(), `type` = " + this.get_type() +
                          ", `b1000` = " + this.getCash_1000() + ", `b500` = " + this.getCash_500() +
                          ", `b200` = " + this.getCash_200() + ", `b100` = " + this.getCash_100() +
                          ", `b50` = " + this.getCash_50() + ", `b20` = " + this.getCash_20() +
                          ", `c10` = " + this.getCash_10() + ", `c5` = " + this.getCash_5() +
                          ", `c1` = " + this.getCash_1() + ", `c25c` = " + this.getCash_25c() +
                          ", `c10c` = " + this.getCash_10c() + ", `c5c` = " + this.getCash_5c() + @" 
               WHERE `SyncId` = " + SyncId + " LIMIT 1";

            //Console.WriteLine(sSQL);
            mySQLFunc.setdb(sSQL);

            mysqlclass.update_synctable("poscashdenomination", SyncId);
        }