示例#1
0
        public void CreateCard()
        {
            var p = new processes(card_mo7sabi.card.process);

            inserttype(card_mo7sabi.part.num_type, card_mo7sabi.cost, Data);

            Data["E8"]  = p.Name;
            Data["E11"] = card_mo7sabi.subject;
            Data["E13"] = "الحصة رقم " + card_mo7sabi.part.num + " : " + card_mo7sabi.part.Name;
            Data["E15"] = " مؤسسة : " + card_mo7sabi.client.Name;
            ///////////////// start top section ////////////
            Data["Z4"] = p.code_.NumProsess[0] + "";
            Data["Y4"] = p.code_.NumProsess[1] + "";
            Data["R4"] = p.code_.Subject + "";
            Data["Q4"] = p.code_.chapter[0] + "";
            Data["P4"] = p.code_.chapter[1] + "";
            Data["O4"] = p.code_.chapter[2] + "";
            Data["N4"] = p.code_.NK[2] + "";
            Data["M4"] = p.code_.NK[0].ToString().ToUpper();
            Data["L4"] = p.code_.NK[1].ToString().ToUpper();

            string year = card_mo7sabi.card.year1.year1.Year.ToString();

            Data["G4"] = year.ElementAt(2) + "";
            Data["F4"] = year.ElementAt(3) + "";
            string a = card_mo7sabi.card.num + "";

            switch (a.Length)
            {
            case 1:
                Data["J4"] = "0";
                Data["I4"] = "0";
                Data["H4"] = a.ElementAt(0) + "";
                break;

            case 2:
                Data["J4"] = "0";
                Data["I4"] = a.ElementAt(0) + "";
                Data["H4"] = a.ElementAt(1) + "";
                break;

            case 3:
                Data["J4"] = a.ElementAt(0) + "";
                Data["I4"] = a.ElementAt(1) + "";
                Data["H4"] = a.ElementAt(2) + "";
                break;
            }
            /////////////////// finsh top section  //////////////

            Data["G32"] = card_mo7sabi.cost + "";
            Data["E36"] = card_mo7sabi.cost + "";
            Data["B36"] = card_mo7sabi.oldCost + "";
            Data["L36"] = (card_mo7sabi.oldCost - card_mo7sabi.cost) + "";

            ExcelHlper excelHlper = new ExcelHlper("mo7asabi_Template", new string[] { "p" });

            excelHlper.EditMenyCell("p", Data);
            excelHlper.SaveAs(card_mo7sabi.card.location);
            excelHlper.Close();
        }
示例#2
0
        public void CreateCard()
        {
            var p = new processes(card_kanoni.card.process);

            inserttype(card_kanoni.part.num_type, card_kanoni.part.Cost, Data);

            Data["F9"]  = p.Name;
            Data["F11"] = " الإلتزام القانوني للمبلغ الملتزم به غير المسدد للعملية الى غاية:" + " 31/ 12/ " + card_kanoni.part.process.date.Year;
            Data["F14"] = "مؤسسة : " + card_kanoni.client.Name;
            ///////////////// start top section ////////////
            Data["Z4"] = p.code_.NumProsess[0] + "";
            Data["Y4"] = p.code_.NumProsess[1] + "";
            Data["R4"] = p.code_.Subject + "";
            Data["Q4"] = p.code_.chapter[0] + "";
            Data["P4"] = p.code_.chapter[1] + "";
            Data["O4"] = p.code_.chapter[2] + "";
            Data["N4"] = p.code_.NK[2] + "";
            Data["M4"] = p.code_.NK[0].ToString().ToUpper();
            Data["L4"] = p.code_.NK[1].ToString().ToUpper();

            string year = card_kanoni.card.year1.year1.Year.ToString();

            Data["G4"] = year.ElementAt(2) + "";
            Data["F4"] = year.ElementAt(3) + "";
            string a = card_kanoni.card.num + "";

            switch (a.Length)
            {
            case 1:
                Data["J4"] = "0";
                Data["I4"] = "0";
                Data["H4"] = a.ElementAt(0) + "";
                break;

            case 2:
                Data["J4"] = "0";
                Data["I4"] = a.ElementAt(0) + "";
                Data["H4"] = a.ElementAt(1) + "";
                break;

            case 3:
                Data["J4"] = a.ElementAt(0) + "";
                Data["I4"] = a.ElementAt(1) + "";
                Data["H4"] = a.ElementAt(2) + "";
                break;
            }
            /////////////////// finsh top section  //////////////

            Data["G32"] = card_kanoni.part.Cost + "";
            Data["E36"] = card_kanoni.part.Cost + "";



            ExcelHlper excelHlper = new ExcelHlper("kanoni_Template", new string[] { "p" });

            excelHlper.EditMenyCell("p", Data);
            excelHlper.SaveAs(card_kanoni.card.location);
            excelHlper.Close();
        }
示例#3
0
 public void CreateCard()
 {
     excel = new ExcelHlper("dafa3_Template", new string[] { "p", "p2" });
     CreateP1();
     CreateP2();
     excel.SaveAs(card_dafa3.location);
     excel.Close();
 }
示例#4
0
 public void CreateCard()
 {
     excel = new ExcelHlper("dafa3_Template", new string[] { "p", "p2" });
     CreateP1();
     CreateP2();
     excel.SaveAs("dafa3_Template" + card_dafa3.num + ".xlsx");
     excel.Close();
 }
示例#5
0
        public void CreateCard()
        {
            var p = new processes(card_sa7ab.card.process);

            types types = new types();

            foreach (p_sa7ab pr in card_sa7ab.p_sa7ab)
            {
                types.insert(pr.part.num_type, pr.cost);
            }

            types.leadData(Data);
            Data["F9"]  = p.Name;
            Data["F11"] = " سحب المبلغ الملتزم به غير المسدد للعملية الى غاية: 31/ 12/ " + p.process.cards.ToList().LastOrDefault().year1.year1.Year;
            //       Data["F11"] = "أخذ بالحساب رقم للمقرر رقم "+p.process.num+" المؤرخ بتاريخ "+p.process.date.ToShortDateString();
            ///////////////// start top section ////////////
            Data["Z4"] = p.code_.NumProsess[0] + "";
            Data["Y4"] = p.code_.NumProsess[1] + "";
            Data["R4"] = p.code_.Subject + "";
            Data["Q4"] = p.code_.chapter[0] + "";
            Data["P4"] = p.code_.chapter[1] + "";
            Data["O4"] = p.code_.chapter[2] + "";
            Data["N4"] = p.code_.NK[2] + "";
            Data["M4"] = p.code_.NK[0].ToString().ToUpper();
            Data["L4"] = p.code_.NK[1].ToString().ToUpper();

            string year = card_sa7ab.card.year1.year1.Year.ToString();

            Data["G4"] = year.ElementAt(2) + "";
            Data["F4"] = year.ElementAt(3) + "";
            string a = card_sa7ab.card.num + "";

            switch (a.Length)
            {
            case 1:
                Data["J4"] = "0";
                Data["I4"] = "0";
                Data["H4"] = a.ElementAt(0) + "";
                break;

            case 2:
                Data["J4"] = "0";
                Data["I4"] = a.ElementAt(0) + "";
                Data["H4"] = a.ElementAt(1) + "";
                break;

            case 3:
                Data["J4"] = a.ElementAt(0) + "";
                Data["I4"] = a.ElementAt(1) + "";
                Data["H4"] = a.ElementAt(2) + "";
                break;
            }
            /////////////////// finsh top section  //////////////

            Data["G32"] = card_sa7ab.card + "";
            Data["E36"] = card_sa7ab.card + "";

            Data["B36"] = card_sa7ab.old_cost + "";
            Data["L36"] = (card_sa7ab.old_cost + card_sa7ab.cost) + "";



            ExcelHlper excelHlper = new ExcelHlper("sa7ab_Template", new string[] { "p" });

            excelHlper.EditMenyCell("p", Data);
            excelHlper.SaveAs(card_sa7ab.card.location);
            excelHlper.Close();
        }
示例#6
0
        public void CreateCard()
        {
            var p = new processes(card_7isab.card.process);

            types  types   = new types();
            double Allcost = 0;

            foreach (part pr in p.process.parts.ToList())
            {
                types.insert(pr.num_type, pr.Cost);
                Allcost += pr.Cost;
            }

            types.leadData(Data);
            Data["F9"]  = p.Name;
            Data["F11"] = "أخذ بالحساب رقم للمقرر رقم " + p.process.num + " المؤرخ بتاريخ " + p.process.date.ToShortDateString();
            ///////////////// start top section ////////////
            Data["Z4"] = p.code_.NumProsess[0] + "";
            Data["Y4"] = p.code_.NumProsess[1] + "";
            Data["R4"] = p.code_.Subject + "";
            Data["Q4"] = p.code_.chapter[0] + "";
            Data["P4"] = p.code_.chapter[1] + "";
            Data["O4"] = p.code_.chapter[2] + "";
            Data["N4"] = p.code_.NK[2] + "";
            Data["M4"] = p.code_.NK[0].ToString().ToUpper();
            Data["L4"] = p.code_.NK[1].ToString().ToUpper();

            string year = card_7isab.card.year1.year1.Year.ToString();

            Data["G4"] = year.ElementAt(2) + "";
            Data["F4"] = year.ElementAt(3) + "";
            string a = card_7isab.card.num + "";

            switch (a.Length)
            {
            case 1:
                Data["J4"] = "0";
                Data["I4"] = "0";
                Data["H4"] = a.ElementAt(0) + "";
                break;

            case 2:
                Data["J4"] = "0";
                Data["I4"] = a.ElementAt(0) + "";
                Data["H4"] = a.ElementAt(1) + "";
                break;

            case 3:
                Data["J4"] = a.ElementAt(0) + "";
                Data["I4"] = a.ElementAt(1) + "";
                Data["H4"] = a.ElementAt(2) + "";
                break;
            }
            /////////////////// finsh top section  //////////////

            Data["G32"] = Allcost + "";
            Data["E36"] = Allcost + "";
            Data["L36"] = Allcost + "";



            ExcelHlper excelHlper = new ExcelHlper("7isab_Template", new string[] { "p" });

            excelHlper.EditMenyCell("p", Data);
            excelHlper.SaveAs(card_7isab.card.location);
            excelHlper.Close();
        }