This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void RaporHazirla(int raporTuru) | |
{ | |
if (raporTuru == 1) | |
{ | |
SubeBazliGunlukIslemRaporu(); | |
} | |
else if (raporTuru == 2) | |
{ | |
PersonelBazliGunlukIslemRaporu(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void RaporYokUyari() | |
{ | |
MessageBox.Show("Bu rapor 01.01.2015 tarihinden itibaren verilememektedir."); | |
} | |
private void RaporHazirla(int raporTuru) | |
{ | |
if (raporTuru == 1) | |
{ | |
SubeBazliGunlukIslemRaporu(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Dictionary<long?, Action> _dictRaporlar = new Dictionary<long?, Action>(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void raporDictionaryOlustur() | |
{ | |
_dictRaporlar[1] = new Action(SubeBazliGunlukIslemRaporu); | |
_dictRaporlar[2] = new Action(PersonelBazliGunlukIslemRaporu); | |
_dictRaporlar[3] = new Action(MusteriBazliGunlukIslemRaporu); | |
_dictRaporlar[4] = new Action(ToplamGunlukIslemRaporu); | |
_dictRaporlar[5] = new Action(RaporYokUyari); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void RaporHazirla(int raporTuru) | |
{ | |
_dictRaporlar[raporTuru].Invoke(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void NeredenGeldim(string parametre, | |
[CallerMemberName]string cagiranMetodAdi = "", | |
[CallerFilePath]string cagiranDosyaYolu = "", | |
[CallerLineNumber]int cagiranSatirNumarasi = 0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static void Main(string[] args) | |
{ | |
MetodCagir(); | |
} | |
private static void MetodCagir() | |
{ | |
NeredenGeldim("Bir metodun serancamı:"); | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void NeredenGeldimEskiVersiyonlar(string parametre, string cagiranMetodAdi = "", string cagiranDosyaYolu = "", int cagiranSatirNumarasi = 0) | |
{ | |
StackTrace st = new StackTrace(true); | |
StackFrame[] frames = st.GetFrames(); | |
Console.WriteLine(parametre); | |
Console.WriteLine("Çağıran Metodun Adı : " + cagiranMetodAdi); | |
Console.WriteLine("Çağıran Metodun Dosya Yolu : " + cagiranDosyaYolu); | |
Console.WriteLine("Çağıran Metodun Satır Numarası : " + cagiranSatirNumarasi); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
StackFrame[] frames = | |
st.GetFrames() | |
.Where(s => s.GetMethod().DeclaringType.FullName.Contains("MerhabaDunya.Program")) | |
.ToArray(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void NeredenGeldimEskiVersiyonlar(string parametre, string cagiranMetodAdi = "", string cagiranDosyaYolu = "", int cagiranSatirNumarasi = 0) | |
{ | |
StackTrace st = new StackTrace(true); | |
StackFrame[] frames = st.GetFrames(); | |
StackFrame frame = new StackFrame(); | |
if (frames != null) | |
{ | |
frame = frames.FirstOrDefault(s => s.GetMethod().DeclaringType.FullName.Contains("MerhabaDunya.Program") && s.GetMethod().Name != "NeredenGeldimEskiVersiyonlar"); | |
cagiranMetodAdi = frame.GetMethod().Name; |
OlderNewer