Ejemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                //LOGİN GİRİŞ BAŞLANGIÇ
                Guid userId = new Guid();
                if (Membership.GetUser() != null)
                {
                    userId = new Guid(Membership.GetUser().ProviderUserKey.ToString());
                }
                else
                {
                    FormsAuthentication.SignOut();
                    Session.Abandon();
                    Response.Redirect("~/Account/Login.aspx");
                    return;
                }
                //LOGİN GİRİŞ BİTİŞ
            }
            var list = tiger2db.OD_SP_006_01_CARI_EKSTRE("").ToList();

            if (list.Count > 0)
            {
                EmployeesGrid.DataSource = list;
                EmployeesGrid.DataBind();
            }
            else
            {
                EmployeesGrid.DataSource = null;
                EmployeesGrid.DataBind();
            }
        }
Ejemplo n.º 2
0
        protected void BindGrid()
        {
            //EmployeesGrid.DataSource = DataProvider.Employees.ToList();
            //EmployeesGrid.FilterExpression = OwnerPage.FilterBag.GetExpression(false);
            //EmployeesGrid.DataBind();

            _BaslangicTarihi = OwnerPage.BaslangicTarihi;
            _BitisTarihi     = OwnerPage.BitisTarihi;
            ProfileBase curProfile = ProfileBase.Create(Membership.GetUser().UserName);
            string      BayiID     = curProfile.GetPropertyValue("BayiID").ToString();

            if (Roles.GetRolesForUser(Membership.GetUser().UserName)[0].ToString() == "PersonelYonetici" ||
                Roles.GetRolesForUser(Membership.GetUser().UserName)[0].ToString() == "PersonelTeknik" ||
                Roles.GetRolesForUser(Membership.GetUser().UserName)[0].ToString() == "TemsilciYonetici" ||
                Roles.GetRolesForUser(Membership.GetUser().UserName)[0].ToString() == "DeveloperUser" ||
                Roles.GetRolesForUser(Membership.GetUser().UserName)[0].ToString() == "Muhasebe") //if ile vdm personel yönetici yetkisi için roles dan kontrol edip -1 göndermek lazım.
            {
                if (BayiID == null || BayiID == "" || BayiID == "130" || BayiID == "140")
                {
                    BayiID = "-1";
                }
            }
            var list = db.S_HedefSatisDurumu(Convert.ToInt32(BayiID), _BaslangicTarihi, _BitisTarihi).ToList();

            if (list.Count > 0)
            {
                EmployeesGrid.DataSource = list;
                EmployeesGrid.DataBind();
            }
            else
            {
                EmployeesGrid.DataSource = null;
                EmployeesGrid.DataBind();
            }
        }
Ejemplo n.º 3
0
        protected void BindGrid()
        {
            var urun = db.S_Urunler().ToList();

            if (urun.Count > 0)
            {
                GridViewDataComboBoxColumn combo = EmployeesGrid.Columns["UrunID"] as GridViewDataComboBoxColumn;
                combo.PropertiesComboBox.ValueType  = typeof(int);
                combo.PropertiesComboBox.DataSource = urun;
            }
            var bayi = db.S_Bayi(-1).ToList();

            if (bayi.Count > 0)
            {
                GridViewDataComboBoxColumn combo = EmployeesGrid.Columns["BayiID"] as GridViewDataComboBoxColumn;
                combo.PropertiesComboBox.ValueType  = typeof(int);
                combo.PropertiesComboBox.DataSource = bayi;
            }
            var tip = db.S_Tip(6).ToList();

            if (tip.Count > 0)
            {
                GridViewDataComboBoxColumn combo = EmployeesGrid.Columns["Onay"] as GridViewDataComboBoxColumn;
                combo.PropertiesComboBox.ValueType  = typeof(int);
                combo.PropertiesComboBox.DataSource = tip;
            }
            var list = db.S_Siparisler(-1).ToList();

            if (list.Count > 0)
            {
                EmployeesGrid.DataSource = list;
                EmployeesGrid.DataBind();
            }
        }
        protected void BindGrid()
        {
            var urun = db.S_Urunler().ToList();

            if (urun.Count > 0)
            {
                GridViewDataComboBoxColumn combo = EmployeesGrid.Columns["UrunID"] as GridViewDataComboBoxColumn;
                combo.PropertiesComboBox.ValueType  = typeof(int);
                combo.PropertiesComboBox.DataSource = urun;
            }
            var tip = db.S_Tip(6).ToList();

            if (tip.Count > 0)
            {
                GridViewDataComboBoxColumn combo = EmployeesGrid.Columns["Onay"] as GridViewDataComboBoxColumn;
                combo.PropertiesComboBox.ValueType  = typeof(int);
                combo.PropertiesComboBox.DataSource = tip;
            }
            ProfileBase curProfile = ProfileBase.Create(Membership.GetUser().UserName);
            string      bayiid     = curProfile.GetPropertyValue("BayiID").ToString();
            var         list       = db.S_Siparislerim(Convert.ToInt32(bayiid)).ToList();

            if (list.Count > 0)
            {
                EmployeesGrid.DataSource = list;
                EmployeesGrid.DataBind();
            }
        }
Ejemplo n.º 5
0
        protected void BindGrid()
        {
            _AramaKelimesi = "%" + OwnerPage.AramaKelimesi + "%";
            if (OwnerPage.AramaKelimesi == null || OwnerPage.AramaKelimesi == "")
            {
                return;
            }

            var listCihazTakip = tiger2db.OD_SP_CihazTakip(_AramaKelimesi).ToList();
            var listAraRapor   = db.S_CihazTakipAraRapor().ToList();

            List <CihazTakip> list = new List <CihazTakip>();

            foreach (var item in listCihazTakip)
            {
                if (listAraRapor.Count > 0)
                {
                    foreach (var item2 in listAraRapor)
                    {
                        if (item.IMEI == item2.IMEI.ToString())
                        {
                            //*******************
                            DateTime baslamaTarihi = (DateTime)item.FATURA_TAR;
                            DateTime bitisTarihi   = (DateTime)item2.AktivasyonTarihi;
                            TimeSpan kalangun      = bitisTarihi - baslamaTarihi; //Sonucu zaman olarak döndürür
                            int      toplamGun     = (int)kalangun.TotalDays;     // kalanGun den TotalDays ile sadece toplam gun değerini çekiyoruz.
                            //*******************
                            var c = new CihazTakip
                            {
                                BayiAdi         = item.FIRMA_ISMI,
                                BayiKodu        = item2.BayiKodu,
                                CihazAdi        = item.STOK_ACIKLAMASI,
                                CihazKodu       = item.STOK_KODU,
                                IMEI            = item.IMEI,
                                FaturaTarihi    = (DateTime)item.FATURA_TAR,
                                FaturaTutari    = (decimal)item.FATURA_NET_TUTARI,
                                BayiSatisTarihi = (DateTime)item2.AktivasyonTarihi,
                                Gun             = toplamGun
                            };
                            list.Add(c);
                        }
                    }
                }
            }

            if (list.Count > 0)
            {
                EmployeesGrid.DataSource = list;
                EmployeesGrid.DataBind();
            }
            else
            {
                EmployeesGrid.DataSource = null;
                EmployeesGrid.DataBind();
            }
        }
        protected void BindGrid()
        {
            var list = db.S_AktivasyonYonetici(-1).ToList();

            if (list.Count > 0)
            {
                EmployeesGrid.DataSource = list;
                EmployeesGrid.DataBind();
            }
        }
Ejemplo n.º 7
0
        protected void BindGrid()
        {
            //EmployeesGrid.DataSource = DataProvider.Employees.ToList();
            //EmployeesGrid.FilterExpression = OwnerPage.FilterBag.GetExpression(false);
            //EmployeesGrid.DataBind();

            var list = db.OD_SP_PRONIST_006_FATURA().ToList();

            EmployeesGrid.DataSource = list;
            EmployeesGrid.DataBind();
        }
        protected void BindGrid()
        {
            //EmployeesGrid.DataSource = DataProvider.Employees.ToList();
            //EmployeesGrid.FilterExpression = OwnerPage.FilterBag.GetExpression(false);
            //EmployeesGrid.DataBind();

            var list = db.OD_SP_US_006_01_MALZEME_SONALIMMALIYET().ToList();

            EmployeesGrid.DataSource = list;
            EmployeesGrid.DataBind();
        }
        protected void BindGrid()
        {
            ProfileBase curProfile = ProfileBase.Create(Membership.GetUser().UserName);
            string      bayiid     = curProfile.GetPropertyValue("BayiID").ToString();
            var         list       = db.S_AktivasyonVodafoneNet(-1, Convert.ToInt32(bayiid)).ToList();

            if (list.Count > 0)
            {
                EmployeesGrid.DataSource = list;
                EmployeesGrid.DataBind();
            }
        }
Ejemplo n.º 10
0
        protected void BindGrid()
        {
            //EmployeesGrid.DataSource = DataProvider.Employees.ToList();
            //EmployeesGrid.FilterExpression = OwnerPage.FilterBag.GetExpression(false);
            //EmployeesGrid.DataBind();

            var list = db.S_Duyurularim(null).ToList();

            if (list.Count > 0)
            {
                EmployeesGrid.DataSource = list;
                EmployeesGrid.DataBind();
            }
        }
        protected void BindGrid()
        {
            var listBakiye  = tiger2db.OD_SP_BayiBakiye(null).ToList();
            var listTeminat = db.S_BayiTeminat().ToList();

            List <BayiBakiyeTeminat> list = new List <BayiBakiyeTeminat>();

            foreach (var item in listBakiye)
            {
                if (listTeminat.Count > 0)
                {
                    foreach (var item2 in listTeminat)
                    {
                        if (item.CODE == item2.BayiKodu)
                        {
                            var c = new BayiBakiyeTeminat
                            {
                                BayiKodu = item.CODE,
                                BayiAdi  = item.BayiAdi,
                                Bakiye   = (decimal)item.Bakiye,
                                Teminat  = (decimal)item2.Teminat
                            };
                            list.Add(c);
                        }
                    }
                }
                else
                {
                    var c = new BayiBakiyeTeminat
                    {
                        BayiKodu = item.CODE,
                        BayiAdi  = item.BayiAdi,
                        Bakiye   = (decimal)item.Bakiye,
                        Teminat  = (decimal)0
                    };
                    list.Add(c);
                }
            }

            if (list.Count > 0)
            {
                EmployeesGrid.DataSource = list;
                EmployeesGrid.DataBind();
            }
            else
            {
                EmployeesGrid.DataSource = null;
                EmployeesGrid.DataBind();
            }
        }
        protected void BindGrid()
        {
            //EmployeesGrid.DataSource = DataProvider.Employees.ToList();
            //EmployeesGrid.FilterExpression = OwnerPage.FilterBag.GetExpression(false);
            //EmployeesGrid.DataBind();

            var users    = Membership.GetAllUsers();
            var userList = new List <MembershipUser>();

            foreach (MembershipUser user in users)
            {
                userList.Add(user);
            }
            EmployeesGrid.DataSource = userList.ToList();
            EmployeesGrid.DataBind();
        }
Ejemplo n.º 13
0
        protected void BindGrid()
        {
            //EmployeesGrid.DataSource = DataProvider.Employees.ToList();
            //EmployeesGrid.FilterExpression = OwnerPage.FilterBag.GetExpression(false);
            //EmployeesGrid.DataBind();

            _BaslangicTarihi = OwnerPage.BaslangicTarihi;
            _BitisTarihi     = OwnerPage.BitisTarihi;
            ProfileBase curProfile = ProfileBase.Create(Membership.GetUser().UserName);
            string      BayiKodu   = curProfile.GetPropertyValue("BayiKodu").ToString();

            if (Roles.GetRolesForUser(Membership.GetUser().UserName)[0].ToString() == "PersonelYonetici" ||
                Roles.GetRolesForUser(Membership.GetUser().UserName)[0].ToString() == "PersonelTeknik" ||
                Roles.GetRolesForUser(Membership.GetUser().UserName)[0].ToString() == "TemsilciYonetici" ||
                Roles.GetRolesForUser(Membership.GetUser().UserName)[0].ToString() == "DeveloperUser" ||
                Roles.GetRolesForUser(Membership.GetUser().UserName)[0].ToString() == "Muhasebe")
            {
                if (BayiKodu == null || BayiKodu == "") //if ile yönetici yetkisi roles dan kontrol edip -1 göndermek lazım.
                {
                    BayiKodu = "-1";
                }
            }
            var list = tiger2db.OD_SP_006_01_CARI_EKSTRE(BayiKodu).ToList();

            //var list = db.OD_SP_006_01_CARI_EKSTRE(BayiKodu).ToList();
            if (list.Count > 0)
            {
                EmployeesGrid.DataSource = list;
                EmployeesGrid.DataBind();
            }
            else
            {
                EmployeesGrid.DataSource = null;
                EmployeesGrid.DataBind();
            }
            //SON SAYFADAKİ SON SATIRI SEÇTİRMEK İÇİN YAPMIŞTIM, ŞİMDİLİK GEREK KALMADI.
            //int a = EmployeesGrid.PageCount;
            //EmployeesGrid.PageIndex = a;
            //EmployeesGrid.FocusedRowIndex = EmployeesGrid.VisibleRowCount;
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     Update();
     EmployeesGrid.DataBind();
 }
Ejemplo n.º 15
0
 protected void BindGrid()
 {
     EmployeesGrid.DataSource = db.S_Roles().ToList();
     EmployeesGrid.DataBind();
 }