public int Insert() { OleDbCommand komut = new OleDbCommand("usp_hataInsert"); komut.CommandType = CommandType.StoredProcedure; OleDbParameter[] parametreler = new OleDbParameter[] { new OleDbParameter("pHelpLink", HelpLink) , new OleDbParameter("pInnerException", InnerException) , new OleDbParameter("pMessage", Message) , new OleDbParameter("pSource", Source) , new OleDbParameter("pStackTrace", StackTrace) , new OleDbParameter("pTargetSite", TargetSite) , new OleDbParameter("pTarih", Tarih.ToString()) , new OleDbParameter("pFkKullanici", FkKullanici) }; komut.Parameters.AddRange(parametreler); //OleDbParameter sonuc = new OleDbParameter("@pReturnValue", DbType.Int32); //sonuc.Direction = ParameterDirection.Output; //komut.Parameters.Add(sonuc); return(SistemDAL.Execute(komut)); }
public Result <int> Update() { OleDbCommand komut = new OleDbCommand("usp_iletisimmesajUpdate"); komut.CommandType = CommandType.StoredProcedure; OleDbParameter[] parametreler = new OleDbParameter[] { new OleDbParameter("pId", Id) , new OleDbParameter("pIsim", Isim) , new OleDbParameter("pEmail", Email) , new OleDbParameter("pKonu", Konu) , new OleDbParameter("pMesaj", Mesaj) , new OleDbParameter("pDurum", Durum) , new OleDbParameter("pTarih", Tarih.ToString()) , new OleDbParameter("pTelefon", Telefon) }; komut.Parameters.AddRange(parametreler); //OleDbParameter sonuc = new OleDbParameter("@pReturnValue", DbType.Int32); //sonuc.Direction = ParameterDirection.Output; //komut.Parameters.Add(sonuc); return(ClassDAL.ExecuteWithResult(komut)); }
public Result <int> Insert() { OleDbCommand komut = new OleDbCommand("usp_iletisimmesajInsert"); komut.CommandType = CommandType.StoredProcedure; OleDbParameter[] parametreler = new OleDbParameter[] { //new OleDbParameter("pId", Id) new OleDbParameter("pIsim", Isim) , new OleDbParameter("pEmail", Email) , new OleDbParameter("pKonu", Konu) , new OleDbParameter("pMesaj", Mesaj) , new OleDbParameter("pDurum", Durum) , new OleDbParameter("pTarih", Tarih.ToString()) , new OleDbParameter("pTelefon", Telefon) }; komut.Parameters.AddRange(parametreler); //OleDbParameter sonuc = new OleDbParameter("@pReturnValue", DbType.Int32); //sonuc.Direction = ParameterDirection.Output; //komut.Parameters.Add(sonuc); OleDbCommand komutIdentity = new OleDbCommand("SELECT @@Identity FROM iletisimmesaj"); return(ClassDAL.ExecuteReturnIdentity(komut, komutIdentity)); }
public void GorevDurumUpdate(int GorevDurumID) { string sql = "Update tblGorevDurum set GorevID=@GorevID,DurumID=@DurumID,Aciklama=@Aciklama,Tarih=@Tarih,KullaniciID=@KullaniciID Where pkGorevDurumID=" + GorevDurumID; SqlCommand cmd = new SqlCommand(sql, cnn); if (cnn.State == ConnectionState.Open) { cnn.Close(); } cnn.Open(); cmd.Parameters.AddWithValue("@GorevID", GorevID); cmd.Parameters.AddWithValue("@DurumID", DurumID); cmd.Parameters.AddWithValue("@Aciklama", Aciklama); cmd.Parameters.AddWithValue("@Tarih", Tarih.ToString("yyyy.MM.dd")); cmd.Parameters.AddWithValue("@KullaniciID", KullaniciID); cmd.ExecuteNonQuery(); cnn.Close(); }
public void GorevDurumKaydet() { string sql = "Insert Into tblGorevDurum(GorevID,DurumID,Aciklama,Tarih,KullaniciID) Values(@GorevID,@DurumID,@Aciklama,@Tarih,@KullaniciID)"; SqlCommand cmd = new SqlCommand(sql, cnn); if (cnn.State == ConnectionState.Open) { cnn.Close(); } cnn.Open(); cmd.Parameters.AddWithValue("@GorevID", GorevID); cmd.Parameters.AddWithValue("@DurumID", DurumID); cmd.Parameters.AddWithValue("@Aciklama", Aciklama); cmd.Parameters.AddWithValue("@Tarih", Tarih.ToString("yyyy.MM.dd")); cmd.Parameters.AddWithValue("@KullaniciID", KullaniciID); cmd.ExecuteNonQuery(); cnn.Close(); }
public Result <int> Update() { OleDbCommand komut = new OleDbCommand("usp_epostaListUpdate"); komut.CommandType = CommandType.StoredProcedure; OleDbParameter[] parametreler = new OleDbParameter[] { new OleDbParameter("pId", Id) , new OleDbParameter("pEposta", Eposta) , new OleDbParameter("pTarih", Tarih.ToString()) , new OleDbParameter("pTelefon", Telefon) }; komut.Parameters.AddRange(parametreler); //OleDbParameter sonuc = new OleDbParameter("@pReturnValue", DbType.Int32); //sonuc.Direction = ParameterDirection.Output; //komut.Parameters.Add(sonuc); return(ClassDAL.ExecuteWithResult(komut)); }
public Result <int> Insert() { OleDbCommand komut = new OleDbCommand("usp_epostaListInsert"); komut.CommandType = CommandType.StoredProcedure; OleDbParameter[] parametreler = new OleDbParameter[] { //new OleDbParameter("pId", Id) new OleDbParameter("pEposta", Eposta) , new OleDbParameter("pTarih", Tarih.ToString()) , new OleDbParameter("pTelefon", Telefon) }; komut.Parameters.AddRange(parametreler); //OleDbParameter sonuc = new OleDbParameter("@pReturnValue", DbType.Int32); //sonuc.Direction = ParameterDirection.Output; //komut.Parameters.Add(sonuc); OleDbCommand komutIdentity = new OleDbCommand("SELECT @@Identity FROM epostaList"); return(ClassDAL.ExecuteReturnIdentity(komut, komutIdentity)); }
protected void Button5_Click(object sender, EventArgs e) { //MessageBox.Show("Hazırlama İşlemi Tamam...Omercik", MessageBox.MesajTipleri.Info, false, 5); Int32 x, y; Int32 Tarih, DokumNo; Decimal Deger; String Alanadi; FpSpread1.ColumnHeader.Visible = false; FpSpread2.ColumnHeader.Visible = false; FpSpread2.Rows.Count = 0; FpSpread2.Columns.Count = 6; for (x = 1; x <= FpSpread1.Rows.Count - 1; x++) { DokumNo = Convert.ToInt32(FpSpread1.Sheets[0].Cells[x, 1].Value); Tarih = Convert.ToInt32(FpSpread1.Sheets[0].Cells[x, 0].Value); for (y = 2; y <= FpSpread1.Columns.Count - 1; y++) { Alanadi = (FpSpread1.Sheets[0].Cells[0, y].Text.ToString()); Deger = Convert.ToDecimal(FpSpread1.Sheets[0].Cells[x, y].Value); //if (veriler_.kütükadet != "" && veriler_.kütükadet != "0") if (Deger != 0) { FpSpread2.Rows.Count = FpSpread2.Rows.Count + 1; FpSpread2.Sheets[0].Cells[FpSpread2.Rows.Count - 1, 0].Text = Tarih.ToString(); FpSpread2.Sheets[0].Cells[FpSpread2.Rows.Count - 1, 1].Text = DokumNo.ToString(); FpSpread2.Sheets[0].Cells[FpSpread2.Rows.Count - 1, 2].Text = Alanadi.ToString(); FpSpread2.Sheets[0].Cells[FpSpread2.Rows.Count - 1, 5].Text = Deger.ToString(); } } } database.connect(); List <alyaj_tnm_bilgileri> kolonlarFull = new List <alyaj_tnm_bilgileri>(); kolonlarFull = database.AljayKolonListFull(); database.disConnect(); FpSpread2.Sheets[0].ColumnCount = 6; foreach (var kolon in kolonlarFull) { var TANIM = kolon.TANIM.ToString(); var GRUPTANIM = kolon.GRUPTANIM.ToString(); var LOKASYON = kolon.LOKASYON.ToString(); for (int m = 0; m <= FpSpread2.Rows.Count - 1; m++) { var TANIM_ = FpSpread2.Sheets[0].Cells[m, 2].Text; if (TANIM_ == TANIM) { FpSpread2.Sheets[0].Cells[m, 3].Text = GRUPTANIM.ToString(); FpSpread2.Sheets[0].Cells[m, 4].Text = LOKASYON.ToString(); } } } }