Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            //p1
            //Employee e = new Employee(949566503,"Mahdi","Hajian",930);

            //Console.WriteLine("\nId is  {0}",e.Id);
            //Console.WriteLine("-----------------------------");
            //Console.WriteLine("name is  {0} {1}",e.FirstName,e.LastName);
            //Console.WriteLine("-----------------------------");
            //Console.WriteLine("Salery is  {0}",e.Salery);
            //Console.WriteLine("-----------------------------");
            //Console.WriteLine("Net In Com  {0}",e.CalulateNetIncome());

            //p2
            //پارامتر هارا پاس میکنیم
            Maneger m = new Maneger(949566503, "Mahdi", "Hajian", 930, 0.7);

            Console.WriteLine("\nId is  {0}", m.Id);
            Console.WriteLine("-----------------------------");
            Console.WriteLine("name is  {0} {1}", m.FirstName, m.LastName);
            Console.WriteLine("-----------------------------");
            Console.WriteLine("Salery is  {0}", m.Salery);
            Console.WriteLine("-----------------------------");
            Console.WriteLine(m.CalulateNetIncome());

            Console.ReadLine();
        }
        public ActionResult Index(Firma firma, FirmaAciklama firmaAciklama, FirmaYetkili firmaYetkili)
        {
            string hataMesaj = "";

            if (giris())
            {
                firma.KayitAcan          = user.Adi + " " + user.Soyadi;
                firma.FirmaSehir         = "varsayılan";
                firma.KayitTarih         = DateTime.Now;
                firmaAciklama.KayitAcan  = firma.KayitAcan;
                firmaAciklama.KayitTarih = DateTime.Now;
                Maneger mng = new Maneger();
                if (firma != null && firmaAciklama != null && firmaYetkili != null)
                {
                    AciklamaDurum();
                    int ekle = mng.firmaEkle(firma);
                    if (ekle > 0)
                    {
                        if (mng.firmaYetkiliEkle(firma, firmaYetkili) > 0)
                        {
                            if (mng.firmaAciklamaEkle(firma, firmaAciklama, firmaYetkili) > 0)
                            {
                                //hepsi eklendi mesaj
                                ViewBag.add = "Firma Eklendi.";
                            }
                            else
                            {
                                //yetkili eklenmedi
                                hataMesaj += "Firma Acıklama Eklenmedi <br>";
                            }
                        }
                        else
                        {
                            //firma Acıklama eklenmedi
                            hataMesaj += "Firma Yetkili Eklenmedi <br>";
                        }
                    }
                    else if (ekle == -1)
                    {
                        //firma Eklenmedi
                        hataMesaj += "Firma Zaten Kayıtlı <br>";
                    }
                    else
                    {
                        hataMesaj += "Firma Eklenmedi <br>";
                    }
                }
                ViewBag.addError = hataMesaj;
                return(View());
            }
            else
            {
                return(RedirectToAction("Index", "Giris"));
            }
        }
        private void DgvManeger_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (DgvManeger.SelectedItem == null)
            {
                return;
            }


            _selectedManeger = (Maneger)DgvManeger.SelectedItem;


            TxtManegerName.Text         = _selectedManeger.Name;
            TxtManegerPassword.Password = _selectedManeger.Password;
        }
Ejemplo n.º 4
0
 private void Awake()
 {
     if (Instance == null)
     {
         Instance = this;
         GD       = new GameData();
         Load();
         DontDestroyOnLoad(this);
     }
     else
     {
         Destroy(this.gameObject);
     }
 }
 public ActionResult Index(User data)
 {
     if (data.Mail != null)
     {
         //Giriş İşlemi Yap
         Maneger mng = new Maneger();
         BusinesLayerResult <User> res = mng.Login(data.Mail, data.Sifre);
         if (res.Errors.Count > 0)
         {
             res.Errors.ForEach(x => ModelState.AddModelError("", x.Message));
             return(View(data));
         }
         Session["login"] = res.result;
         return(RedirectToAction("Index", "Home"));
     }
     return(View());
 }
 public ActionResult Index(string firmaID)
 {
     if (giris())
     {
         if (firmaID != null)
         {
             AciklamaDurum();
             //ViewBag.YetkiliCombo
             Maneger mng = new Maneger();
             if (mng.firmaKontrol(Int64.Parse(firmaID)))
             {
                 ViewBag.FirmaList    = mng.FirmaList();
                 TempData["FirmaID"]  = firmaID;
                 TempData["aciklama"] = mng.firmaAciklamaList(Int64.Parse(firmaID));
                 TempData["yetkili"]  = mng.firmaYetkiliList(Int64.Parse(firmaID));
                 List <SelectListItem> items = new List <SelectListItem>();
                 foreach (FirmaYetkili data in mng.firmaYetkiliList(Int64.Parse(firmaID)))
                 {
                     items.Add(new SelectListItem {
                         Text = data.Adi + " " + data.Soyadi, Value = data.ID.ToString()
                     });
                 }
                 ViewBag.YetkiliCombo = items;
                 return(View());
             }
             else
             {
                 return(RedirectToAction("Index", "Home"));
             }
         }
         else
         {
             TempData["FirmaID"] = "0";
             //ViewBag.FirmaList
             Maneger mng = new Maneger();
             ViewBag.FirmaList = mng.FirmaList();
             AciklamaDurum();
         }
         return(View());
     }
     else
     {
         return(RedirectToAction("Index", "Giris"));
     }
 }
Ejemplo n.º 7
0
    void Awake()
    {
        if (CompoundFinderer != null)
        {
            GameObject.Destroy(CompoundFinderer);
        }
        else
        {
            CompoundFinderer = this;
        }

        DontDestroyOnLoad(this);


        foundObjects  = new List <CompoundClass>();
        foundObjects2 = new List <CompoundClass>();

        script1 = Kart1.GetComponent <CardBehavior>();
        script2 = Kart2.GetComponent <CardBehavior>();
        script3 = Kart3.GetComponent <CardBehavior>();
    }
        private void BtnLogin_Click(object sender, RoutedEventArgs e)
        {
            if (PasswordBox.Password == "admin" && TxtName.Text == "admin")
            {
                DashboardWindow dw = new DashboardWindow();
                dw.ShowDialog();
                return;
            }
            Maneger maneger = _context.Manegers
                              .Where(m => m.Name == TxtName.Text && m.Password == PasswordBox.Password).FirstOrDefault();

            if (maneger == null)
            {
                MessageBox.Show("Istifadeci adi ve ya sifre yalnisdir.");
            }
            else
            {
                DashboardWindow dw = new DashboardWindow();
                dw.ShowDialog();
            }
        }
Ejemplo n.º 9
0
        private void BtnNewOrder_Click(object sender, RoutedEventArgs e)
        {
            Customer customer = _context.Customers
                                .Where(c => TxtCustomerName.Text == c.Name).FirstOrDefault();
            Books book = _context.Books
                         .Where(b => TxtBookName.Text == b.Name).FirstOrDefault();
            Maneger maneger = _context.Manegers
                              .Where(m => TxtManegerName.Text == m.Name).FirstOrDefault();

            if (customer == null)
            {
                MessageBox.Show("Istifadeci adi tapilmadi");
            }
            else if (book == null)
            {
                MessageBox.Show("Kitab tapilmadi.");
            }
            else if (maneger == null)
            {
                MessageBox.Show("Yazdiginiz adli idareci movcud deyil");
            }
            else
            {
                Report report = new Report
                {
                    BookId     = book.Id,
                    CustomerId = customer.Id,
                    ManegerId  = maneger.Id,
                    endDay     = (DateTime)DtpEndDay.SelectedDate,
                    startDay   = (DateTime)DtpStartDay.SelectedDate,
                    //startDay = DateTime.Now
                };

                _context.Report.Add(report);
                _context.SaveChanges();

                Reset();
                MessageBox.Show("Sifaris qeyd olundu");
            }
        }
        private void BtnManegerAdd_Click(object sender, RoutedEventArgs e)
        {
            string ManegerName = TxtManegerName.Text;
            string Password    = TxtManegerPassword.Password;

            if (string.IsNullOrEmpty(ManegerName) || string.IsNullOrEmpty(Password) || Password.Length < 7)
            {
                MessageBox.Show("Idareci adi ve ya sifre bos olmamalidir.");
            }

            else
            {
                Maneger maneger = new Maneger
                {
                    Name     = TxtManegerName.Text,
                    Password = TxtManegerPassword.Password
                };
                _context.Manegers.Add(maneger);
                _context.SaveChanges();
                Reset();
                MessageBox.Show("Yeni idareci elave edildi.");
            }
        }
Ejemplo n.º 11
0
        static void Main(string[] args)
        {
            GetAllNamesCar(new List <object>()
            {
                new auto {
                    Id = 1, Name = "Jiguli",
                }, new Models {
                    Id = 1, model = "Vaz 2111", SummaAuto = "7000$ "
                }
            });
            Car car1 = new Car {
                Model = 2111, Name = "Jiguli"
            };
            RossianCar car2 = new RossianCar {
                Model = 2106, Name = "Jiguli"
            };

            car1.createAnewCar();
            car2.PoverFulCar();
            Programmer Car   = new Programmer();
            Maneger    Lenin = new Maneger();

            Lenin.CreateTasks();
        }