Beispiel #1
0
        public void Send()
        {
            lock (emailinfo)
            {
                try
                {
                    ESM.MailDomainPort = emailinfo.Port;
                    ESM.AddRecipient(this.Email);
                    ESM.RecipientName = this.UserName;//设定收件人姓名

                    ESM.From               = emailinfo.Sysemail;
                    ESM.FromName           = configinfo.Webtitle;
                    ESM.Html               = true;
                    ESM.Subject            = this.Title;
                    ESM.Body               = "<pre style=\"width:100%;word-wrap:break-word\">" + this.Body.ToString() + "</pre>";
                    ESM.MailDomain         = emailinfo.Smtp;
                    ESM.MailServerUserName = emailinfo.Username;
                    ESM.MailServerPassWord = emailinfo.Password;

                    //开始发送
                    this.IsSuccess = ESM.Send();
                }
                catch
                { }
            }
            Thread.CurrentThread.Abort();
        }
Beispiel #2
0
        public static void Guncelle(ESM Eklemeli)
        {
            OleDbConnection con = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Veritabani\\Data.mdb;Jet OLEDB:Database Password=ayakkabi_gelisimsoft;");

            if (con.State == ConnectionState.Closed)
            {
                con.Open();
            }

            #region VeriTabanindanStokBilgisiniCekiyoruz

            //Stok miktarını çekecek ilgili OleDbDataAdapter yazıyoruz.
            OleDbCommand da = new OleDbCommand("select Miktar,KStok from StokMaliyet WHERE ((StokMaliyet.SMID)=@ID)", con);
            da.Parameters.AddWithValue("@ID", Eklemeli.SMID);
            OleDbDataReader dr = da.ExecuteReader();
            while (dr.Read())
            {
                if (dr.HasRows == true)
                {
                    EskiMiktar = Convert.ToDouble(dr["Miktar"].ToString());
                    EskiID     = Convert.ToInt32(dr["KStok"].ToString());
                }
            }

            #endregion VeriTabanindanStokBilgisiniCekiyoruz

            OleDbCommand VayComHaci = new OleDbCommand("update StokMaliyet set UStok=@U,KStok=@K,Miktar=@M,Tarih=@T,Birim=@B WHERE ((StokMaliyet.SMID)=@ID)", con);
            VayComHaci.Parameters.AddWithValue("@U", Eklemeli.UStok);
            VayComHaci.Parameters.AddWithValue("@K", Eklemeli.KStok);
            VayComHaci.Parameters.AddWithValue("@M", Eklemeli.Miktar);
            VayComHaci.Parameters.AddWithValue("@T", Eklemeli.Tarih);
            VayComHaci.Parameters.AddWithValue("@B", Eklemeli.Birim);
            VayComHaci.Parameters.AddWithValue("@ID", Eklemeli.SMID);
            try
            {
                if (VayComHaci.ExecuteNonQuery() > 0)
                {
                    OleDbCommand ComHaci = new OleDbCommand("update stoklar set miktar=miktar+@EM WHERE ((stoklar.stokid)=@EK)", con);
                    ComHaci.Parameters.AddWithValue("@EM", EskiMiktar);
                    ComHaci.Parameters.AddWithValue("@EK", EskiID);
                    if (ComHaci.ExecuteNonQuery() > 0)
                    {
                        OleDbCommand ComHaci2 = new OleDbCommand("update stoklar set miktar=miktar-@YM WHERE ((stoklar.stokid)=@YK)", con);
                        ComHaci2.Parameters.AddWithValue("@YM", Eklemeli.Miktar);
                        ComHaci2.Parameters.AddWithValue("@YK", Eklemeli.KStok);
                        if (ComHaci2.ExecuteNonQuery() > 0)
                        {
                            MessageBox.Show("Stok Maliyet Güncelleme İşlemi Yapılmıştır.", "Güncelleme", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        }
                    }
                }
            }
            catch (Exception Ex)
            {
                MessageBox.Show(Ex.ToString(), "Hata", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
            finally { con.Close(); }
        }
Beispiel #3
0
        public static async Task <ESM> GetESMAsync(string path)
        {
            ESM esm = null;
            HttpResponseMessage response = await client.GetAsync(path);

            if (response.IsSuccessStatusCode)
            {
                esm = await response.Content.ReadAsAsync <ESM>();
            }
            return(esm);
        }
Beispiel #4
0
        private static void Main()
        {
            var esm = new ESM(@"C:\Program Files (x86)\Steam\SteamApps\common\Morrowind\Data Files\Morrowind.esm");

            Console.WriteLine($"Loaded {esm.Records.Count} records");
            foreach (var record in esm.Records)
            {
                Console.WriteLine($"{record.Name} has {record.SubRecords.Count} sub-records");
            }
            Console.WriteLine("Press any key to exit...");
            Console.ReadKey();
        }
Beispiel #5
0
        public static async Task <ESM> UpdateProductAsync(ESM esm)
        {
            HttpResponseMessage response = await client.PutAsJsonAsync(
                $"api/products/{esm.number}", esm);

            response.EnsureSuccessStatusCode();

            // Deserialize the updated product from the response body.
            esm = await response.Content.ReadAsAsync <ESM>();

            return(esm);
        }
Beispiel #6
0
        private void button4_Click(object sender, EventArgs e)
        {
            DialogResult soruyoruz = MessageBox.Show("Stok Maliyet İşlemini Silmek İstediğinize Eminin misiniz. ?", "Silme", MessageBoxButtons.YesNo, MessageBoxIcon.Question);

            if (soruyoruz == DialogResult.Yes)
            {
                ESM s = new ESM();
                s.SMID   = ID;
                s.Miktar = Convert.ToDouble(miktar.Text);
                s.KStok  = KID;
                FSM.Sil(s);
                Getir();
                FKontrol();
                Temizle();
                Getir();
                this.Close();
            }
        }
Beispiel #7
0
        static void Main(string[] args)
        {
            ESM esm_raw1 = ESM.read_from_file("tmp\\skyrim.esm");

            Log.exit("DONE");

            ESM esm_raw = ESM.read_from_file(Config.Paths.skyrim_path + "final.esp");

            Generator generator = new Generator();

            generator.load_file(esm_raw);

            generator.make_navmesh();


            esm_raw.write_to_file("navmeshtest.esp");
            Log.exit("DONE");
        }
Beispiel #8
0
        public static List <Group> convert(string file)
        {
            if (!LTEX.done)
            {
                Log.error("Must convert LTEX before converting LAND.");
            }

            External.TESAnnwyn tesannwyn = new External.TESAnnwyn();

            tesannwyn.convert(file, Config.Paths.tmp + "tmp.esp");

            ESM          esm  = ESM.read_from_file(Config.Paths.tmp + "tmp.esp");
            List <Group> grps = esm.getGroups();

            new LAND().renumber_formids(grps);

            return(grps);
        }
Beispiel #9
0
        private void button4_Click(object sender, EventArgs e)
        {
            DialogResult soruyoruz = MessageBox.Show("Stok Maliyet İşlemini Güncellemek İstediğinize Eminin misiniz. ?", "Güncelleme", MessageBoxButtons.YesNo, MessageBoxIcon.Question);

            if (soruyoruz == DialogResult.Yes)
            {
                ESM s = new ESM();
                s.SMID   = ID;
                s.UStok  = Convert.ToInt32(Uretilencombo.SelectedValue);
                s.KStok  = Convert.ToInt32(Kullanilancombo.SelectedValue);
                s.Miktar = Convert.ToDouble(miktar.Text);
                s.Birim  = birim.Text;
                s.Tarih  = Convert.ToDateTime(dateTimePicker1.Value);
                FSM.Guncelle(s);
            }
            Getir();
            FKontrol();
            Temizle();
            this.Close();
        }
Beispiel #10
0
        private void button4_Click(object sender, EventArgs e)
        {
            DialogResult soruyoruz = MessageBox.Show("Stok Maliyet İşlemini Kaydetmek İstediğinize Eminin misiniz. ?", "Kaydetme", MessageBoxButtons.YesNo, MessageBoxIcon.Question);

            if (soruyoruz == DialogResult.Yes)
            {
                try
                {
                    ESM s = new ESM();
                    s.UStok  = Convert.ToInt32(Ucombo.SelectedValue);
                    s.KStok  = Convert.ToInt32(Kcombo.SelectedValue);
                    s.Miktar = Convert.ToDouble(miktar.Text);
                    s.Birim  = birim.Text;
                    s.Tarih  = Convert.ToDateTime(maskedTextBox1.Text);
                    FSM.Ekle(s);
                    Temizle();
                    Getir();
                }
                catch (Exception Ex)
                {
                    MessageBox.Show(Ex.ToString(), "Hata", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
        }
 public void TakeESMToTheDepot(ESM esm, Driver driver)
 {
     throw new NotImplementedException();
 }
 public void GiveESMToDriver(ESM esm, Driver driver)
 {
     throw new NotImplementedException();
 }