public void buttonStart_Click(object sender, EventArgs e) { SaveFileDialog sfd = new SaveFileDialog(); sfd.Filter = "Excel file|*.xlsx"; sfd.Title = "Save Excel File"; sfd.ShowDialog(); SaveFileName = sfd.FileName; if (sfd.FileName.Length == 0) { return; } TaxesToken = CopyToken(textBoxLink.Text); TimeSpan span = dateTimePickerSon.Value - dateTimePickerIlk.Value; progressBar.Maximum = span.Days + 1; progressBar.Minimum = 0; progressBar.Value = 0; string[] linrArray = CreateLinkArray(TaxesToken, DateToString(dateTimePickerIlk.Value), DateToString(dateTimePickerSon.Value), progressBar); progressBar.Maximum = linrArray.Length; progressBar.Minimum = 0; progressBar.Value = 0; List <EVHF> EVHFlist = new List <EVHF>(); List <EQaime> EQlist = new List <EQaime>(); if (DocType == 0) { EVHF tempEVHF = new EVHF(); tempEVHF.RZLoadFromTaxes(ref EVHFlist, ref linrArray, ref progressBar); EVHF.CreateExcel(ref EVHFlist); } else { EQaime tempEQaime = new EQaime(); tempEQaime.RZLoadFromTaxes(ref EQlist, linrArray); EQaime.CreateExcel(ref EQlist); } MessageBox.Show("Yükləndi!"); }
public static void Main(string[] args) { MainMenyu(); string[] linrArray = CreateLinkArray(EVHFsLink, TaxesIlkTarix, TaxesSonTarix); List <EVHF> EVHFlist = new List <EVHF>(); List <EQaime> EQlist = new List <EQaime>(); if (DocType == 0) { EVHF.RZLoadFromTaxes(ref EVHFlist, linrArray); EVHF.CreateExcel(ref EVHFlist); } else { EQaime.RZLoadFromTaxes(ref EQlist, linrArray); EQaime.CreateExcel(ref EQlist); } Console.ReadKey(); }
public EQaime(EQaime eQaime) { IO = eQaime.IO; Voen = eQaime.Voen; Ad = eQaime.Ad; Tip = eQaime.Tip; Veziyyet = eQaime.Veziyyet; Tarix = eQaime.Tarix; Seriya = eQaime.Seriya; Nomre = eQaime.Nomre; EsasQeyd = eQaime.EsasQeyd; ElaveQeyd = eQaime.ElaveQeyd; EDVsiz = eQaime.EDVsiz; EDV = eQaime.EDV; EDVcelb = eQaime.EDVcelb; EDVcelbNo = eQaime.EDVcelbNo; EDVcelb0 = eQaime.EDVcelb0; Hesab1C = eQaime.Hesab1C; MVQeyd = eQaime.MVQeyd; }
public static List <EQaime> StringToListEQ(string str) { var RZEQList = new List <EQaime>(); var RZEQ = new EQaime(); int j = 0, k = 0, count = 0; for (int i = 0; i < str.Length; i++) { string tempDocx = ""; for (; j < MainTaxes.TextForBegin.Length; j++) { tempDocx += str[(i + j) >= str.Length - 1 ? str.Length - 1 : (i + j)]; } if (tempDocx == MainTaxes.TextForBegin) { count++; string Xvalue = ""; int tempIndex = 0; do { tempIndex = (i + j + k) >= str.Length - 1 ? str.Length - 1 : (i + j + k); Xvalue += str[tempIndex]; k++; } while (str[tempIndex] != '<'); Xvalue = Xvalue.Replace("<", ""); tempIndex = 0; k = 0; i = (i + j + k + Xvalue.Length) >= str.Length - 1 ? str.Length - 1 : (i + j + k + Xvalue.Length); if (count == 1) { RZEQ /*[0]*/.IO = MainTaxes.TaxesIO; RZEQ /*[1]*/.Voen = Xvalue; } if (count == 2) { RZEQ /*[2]*/.Ad = Xvalue; } if (count == 3) { RZEQ /*[3]*/.Tip = Xvalue; } if (count == 4) { RZEQ /*[4]*/.Veziyyet = Xvalue; } if (count == 5) { RZEQ /*[5]*/.Tarix = Xvalue; } if (count == 6) { RZEQ /*[6]*/.Seriya = Xvalue; } if (count == 7) { RZEQ /*[7]*/.Nomre = Xvalue; } if (count == 8) { RZEQ /*[8]*/.EsasQeyd = Xvalue; } if (count == 9) { RZEQ /*[9]*/.ElaveQeyd = Xvalue; } if (count == 10) { //Xvalue = Xvalue.Replace(".", ","); //RZEVHF.EDVsiz = decimal.Parse(Xvalue); RZEQ /*[10]*/.EDVsiz = Xvalue; } if (count == 11) { //Xvalue = Xvalue.Replace(".", ","); //RZEVHF.EDV = decimal.Parse(Xvalue); RZEQ /*[11]*/.EDV = Xvalue; } if (count == 12) { RZEQ.EDVcelb = Xvalue; } if (count == 13) { RZEQ.EDVcelbNo = Xvalue; } if (count == 14) { RZEQ.EDVcelb0 = Xvalue; RZEQ /*[12]*/.Hesab1C = (MainTaxes.TaxesIO == "I" ? "531.1" : "211.3"); RZEQ /*[13]*/.MVQeyd = ""; //Console.WriteLine(RZEVHF.ToString()); switch (MainTaxes.TaxesVeziyyet) { case 1: if (RZEQ.Tip == "D") { RZEQList.Add(new EQaime(RZEQ)); } break; case 2: if (RZEQ.Veziyyet == "Ləğv edilib") { RZEQList.Add(new EQaime(RZEQ)); } break; case 4: if (RZEQ.Veziyyet == "Normal") { RZEQList.Add(new EQaime(RZEQ)); } break; case 5: if (RZEQ.Veziyyet == "EVHF hazırlanıb") { RZEQList.Add(new EQaime(RZEQ)); } break; case 6: if (RZEQ.Veziyyet == "Rədd olunub") { RZEQList.Add(new EQaime(RZEQ)); } break; case 7: if (RZEQ.Veziyyet == "EVHF göndərilib") { RZEQList.Add(new EQaime(RZEQ)); } break; case 8: if (RZEQ.Veziyyet == "EVHF ləğv olunub") { RZEQList.Add(new EQaime(RZEQ)); } break; case 10: if (RZEQ.Veziyyet == "Sistem EVHF hazırlayıb") { RZEQList.Add(new EQaime(RZEQ)); } break; case 11: if (RZEQ.Veziyyet == "Sistem qaiməni ləğv edib") { RZEQList.Add(new EQaime(RZEQ)); } break; default: RZEQList.Add(new EQaime(RZEQ)); break; } //RZEVHFList.Add(new EVHF(RZEVHF[0], // RZEVHF[1], // RZEVHF[2], // RZEVHF[3], // RZEVHF[4], // RZEVHF[5], // RZEVHF[6], // RZEVHF[7], // RZEVHF[8], // RZEVHF[9], // RZEVHF[10], // RZEVHF[11], // RZEVHF[12], // RZEVHF[13])); count = 0; } } j = 0; } return(RZEQList); }