protected void NodeDegistir(object sender, DirectEventArgs e)
        {
            try
            {
                int INodeID = int.Parse(e.ExtraParams["id"].ToString());

                using (BaglantiCumlesi db = new BaglantiCumlesi())
                {
                    tbl_dosyalar_kategori tbk = (from p in db.tbl_dosyalar_kategori where p.id == INodeID select p).FirstOrDefault();

                    if (tbk.ad != e.ExtraParams["value"].ToString())
                    {
                        tbk.ad           = e.ExtraParams["value"].ToString();
                        tbk.admin_id_gun = Class.Fonksiyonlar.Admin.Genel.AdminID();
                        db.SaveChanges();

                        #region Admin İşlem Log
                        Class.Fonksiyonlar.Admin.Log.Islemler(Class.Fonksiyonlar.Admin.Genel.AdminID(), ((EntityObject)(tbk)).EntityKey.EntitySetName.ToString(), tbk.id, (int)Class.Sabitler.AdminLog.Islemler.Update);
                        #endregion

                        Store1.DataBind();
                    }
                }
            }
            catch (Exception Ex)
            {
                Class.Fonksiyonlar.ExtJS.MesajKutusu(Icon.Error, MessageBox.Icon.ERROR, "İşlem başarısız", Ex.Message);
            }
        }
Example #2
0
        public async Task <IActionResult> PutStore1(long id, Store1 store1)
        {
            if (id != store1.Id)
            {
                return(BadRequest());
            }

            _context.Entry(store1).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!Store1Exists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }
Example #3
0
        public async Task <ActionResult <Store1> > PostStore1(Store1 store1)
        {
            _context.Store1s.Add(store1);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("GetStore1", new { id = store1.Id }, store1));
        }
Example #4
0
    //绑定走动计划
    private void bindPlan()
    {
        var sqltext = from a in db.Moveplan
                      from b in db.Person
                      from c in db.Place
                      from d in db.Department
                      where a.Personid == b.Personnumber && a.Placeid == c.Placeid && b.Deptid == d.Deptnumber &&
                      a.Personid == SessionBox.GetUserSession().PersonNumber &&
                      (a.Starttime.Value <= System.DateTime.Today && System.DateTime.Today <= a.Endtime.Value)
                      select new
        {
            ID            = a.Id,
            EndTime       = a.Endtime,
            StartTime     = a.Starttime,
            PersonID      = a.Personid,
            MoveStartTime = a.Movestarttime,
            MoveEndTime   = a.Moveendtime,
            Name          = b.Name,
            PlaceName     = c.Placename,
            DeptName      = d.Deptname,
            MoveState     = a.Movestate
        };

        Store1.DataSource = sqltext;
        Store1.DataBind();
        Button4.Disabled = sqltext.Count() > 0 ? false : true;
    }
Example #5
0
        protected void addDepartment(object sender, DirectEventArgs e)
        {
            Department dept = new Department();

            if (string.IsNullOrEmpty(parentId.Text))
            {
                return;
            }
            dept.name = parentId.Text;

            PostRequest <Department> depReq = new PostRequest <Department>();

            depReq.entity = dept;
            PostResponse <Department> response = _branchService.ChildAddOrUpdate <Department>(depReq);

            if (response.Success)
            {
                dept.recordId = response.recordId;
                departmentStore.Reload();
                parentId.Select(dept.recordId);
                Store1.Insert(0, dept);
            }
            else
            {
                X.MessageBox.ButtonText.Ok = Resources.Common.Ok;
                Common.errorMessage(response);
                return;
            }
        }
Example #6
0
        protected void addPosition(object sender, DirectEventArgs e)
        {
            if (string.IsNullOrEmpty(referToPositionId.Text))
            {
                return;
            }
            Model.Company.Structure.Position dept = new Model.Company.Structure.Position();
            dept.name = referToPositionId.Text;

            PostRequest <Model.Company.Structure.Position> depReq = new PostRequest <Model.Company.Structure.Position>();

            depReq.entity = dept;
            PostResponse <Model.Company.Structure.Position> response = _branchService.ChildAddOrUpdate <Model.Company.Structure.Position>(depReq);

            if (response.Success)
            {
                dept.recordId = response.recordId;
                positionStore.Reload();
                referToPositionId.Select(dept.recordId);
                Store1.Insert(0, dept);
            }
            else
            {
                X.MessageBox.ButtonText.Ok = Resources.Common.Ok;
                Common.errorMessage(response);
                return;
            }
        }
Example #7
0
        protected void KayitSil(object sender, EventArgs e)
        {
            if (((Ext.Net.AfterRecordDeletedEventArgs)(e)).Keys["id"].ToString() != null)
            {
                if (((Ext.Net.AfterRecordDeletedEventArgs)(e)).Keys["id"].ToString().Trim() != "")
                {
                    using (BaglantiCumlesi db = new BaglantiCumlesi())
                    {
                        int        PID = int.Parse(((Ext.Net.AfterRecordDeletedEventArgs)(e)).Keys["id"].ToString().Trim());
                        tbl_diller ta  = (from p in db.tbl_diller where p.id == PID select p).FirstOrDefault();

                        if (!ta.ana_dil)
                        {
                            db.DeleteObject(ta);

                            #region Admin İşlem Log
                            Class.Fonksiyonlar.Admin.Log.Islemler(Class.Fonksiyonlar.Admin.Genel.AdminID(), ((EntityObject)(ta)).EntityKey.EntitySetName.ToString(), PID, (int)Class.Sabitler.AdminLog.Islemler.Delete);
                            #endregion

                            db.SaveChanges();
                        }
                    }
                }

                Store1.DataBind();
            }
        }
Example #8
0
        private void BindData()
        {
            var customerActions = base.ACLService.GetAllCustomerActionsByACLModule(this.CustomerRoleID, null);

            Store1.DataSource = customerActions;
            Store1.DataBind();
        }
    public void OturumSonlandir(string SessionID)
    {
        Session[SessionID] = null;
        Session.Remove(SessionID);

        #region Objelerden Oturum Sil
        Application.Lock();

        #region Dillerden Sil
        int index = -1;
        index = Objeler.Listeler.Dil.FindIndex(delegate(Objeler.Tanimlar.Dil p)
        {
            return(p.SessionID == SessionID);
        });
        if (index != -1)
        {
            Objeler.Listeler.Dil.RemoveAt(index);
        }
        #endregion

        Application.UnLock();
        #endregion

        RSM.ClearSelections();
        Store1.DataBind();
    }
Example #10
0
        public void showcarinfo(string hphm, string clpp, string csys, string hpzl)
        {
            DataTable dt = GetClData();
            DataRow   dr = dt.NewRow();

            dr["cartype"] = "伴随";
            dr["hphm"]    = hphm.Trim();
            dr["clpp"]    = Bll.Common.Changenull(clpp);
            dr["csys"]    = Bll.Common.GetCsysms(csys);
            dr["hpzl"]    = (hpzl != "" ? gethpzl(hpzl) : "");
            DataRow[] results = Dt_result.Select(" hphm='" + cboplate.VehicleText + txtplate.Text + "'");
            DataRow   dr1     = dt.NewRow();

            if (results.Length > 0)
            {
                dr1["cartype"] = "主车";
                dr1["hphm"]    = cboplate.VehicleText + txtplate.Text.Trim();
                dr1["clpp"]    = Bll.Common.Changenull(results[0]["clpp"].ToString());
                dr1["csys"]    = Bll.Common.GetCsysms(results[0]["csys"].ToString());
                dr1["hpzl"]    = (results[0]["hpzl"].ToString() != "" ? gethpzl(hpzl) : "");
            }
            dt.Rows.Add(dr1);
            dt.Rows.Add(dr);
            Store1.DataSource = dt;
            Store1.DataBind();
        }
Example #11
0
    public void storeload()//执行查询
    {
        if (dfBegin.SelectedDate > dfEnd.SelectedDate)
        {
            Ext.Msg.Alert("提示", "请选择正确日期").Show();
            return;
        }
        //各基层单位查询本矿新增隐患信息
        var q = from h in dc.Yscollect
                from p in dc.Person
                from d in dc.Department
                where h.Personnumber == p.Personnumber && h.Maindept == d.Deptnumber && h.Status == "是" &&
                h.Intime.Value.Date >= dfBegin.SelectedDate.Date && h.Intime.Value.Date <= dfEnd.SelectedDate.Date
                select new
        {
            h.Cid,
            YinHuanContent = h.Yhcontent,
            p.Name,
            h.Ysbz,
            InTime   = h.Intime,
            DeptName = d.Deptname
        };

        Store1.DataSource = q;
        Store1.DataBind();
    }
Example #12
0
    private void LearnStoreLoad()
    {
        var data = from s in dc.Swexamine
                   from sw in dc.Nswinput
                   from sh in dc.Getswandhazusing
                   from per in dc.Person
                   from dep in dc.Department
                   where s.Swid == sw.Id && sw.Swid == sh.Swid &&
                   sw.Swpersonid == per.Personnumber &&
                   sh.Deptnumber == SessionBox.GetUserSession().DeptNumber &&
                   per.Deptid == dep.Deptnumber &&
                   sw.Maindeptid == SessionBox.GetUserSession().DeptNumber
                   orderby sw.Intime descending
                   select new
        {
            s.Swid,
            Swperson = per.Name,
            Kqname   = dep.Deptname,
            sh.Levelname,
            s.Stime,
            s.Etime,
            s.Result,
            Isfinish = s.Isfinish == 1
        };

        Store1.DataSource = data;
        Store1.DataBind();
    }
        public void DM_NodeSurukle(string NodeID, string YeniUstKategori)
        {
            try
            {
                int INodeID = int.Parse(NodeID);

                using (BaglantiCumlesi db = new BaglantiCumlesi())
                {
                    tbl_dosyalar_kategori tbk = (from p in db.tbl_dosyalar_kategori where p.id == INodeID select p).FirstOrDefault();
                    tbk.kategori_id  = int.Parse(YeniUstKategori);
                    tbk.admin_id_gun = Class.Fonksiyonlar.Admin.Genel.AdminID();
                    db.SaveChanges();

                    #region Admin İşlem Log
                    Class.Fonksiyonlar.Admin.Log.Islemler(Class.Fonksiyonlar.Admin.Genel.AdminID(), ((EntityObject)(tbk)).EntityKey.EntitySetName.ToString(), tbk.id, (int)Class.Sabitler.AdminLog.Islemler.Update);
                    #endregion
                }

                Store1.DataBind();
            }
            catch (Exception Ex)
            {
                Class.Fonksiyonlar.ExtJS.MesajKutusu(Icon.Error, MessageBox.Icon.ERROR, "İşlem başarısız", Ex.Message);
            }
        }
        protected void GuncellemeYap(object sender, DirectEventArgs e)
        {
            using (BaglantiCumlesi db = new BaglantiCumlesi())
            {
                int PID = int.Parse(Duzenle_ID.Text.Trim());
                tbl_dosyalar_kategori ta = (from p in db.tbl_dosyalar_kategori where p.id == PID select p).FirstOrDefault();
                ta.ad = Class.Fonksiyonlar.Genel.StringIslemleri(Class.Sabitler.StringIslemleri.StringIslemTipleri.SQLTemizle, Duzenle_TextFieldKategori.Text.Trim());

                if (Duzenle_TextAreaAciklama.Text != null)
                {
                    if (!string.IsNullOrEmpty(Class.Fonksiyonlar.Genel.StringIslemleri(Class.Sabitler.StringIslemleri.StringIslemTipleri.SQLTemizle, Duzenle_TextAreaAciklama.Text.Trim())))
                    {
                        ta.aciklama = Class.Fonksiyonlar.Genel.StringIslemleri(Class.Sabitler.StringIslemleri.StringIslemTipleri.SQLTemizle, Duzenle_TextAreaAciklama.Text.Trim());
                    }
                    else
                    {
                        ta.aciklama = null;
                    }
                }

                ta.admin_id_gun = Class.Fonksiyonlar.Admin.Genel.AdminID();
                db.SaveChanges();

                #region Admin İşlem Log
                Class.Fonksiyonlar.Admin.Log.Islemler(Class.Fonksiyonlar.Admin.Genel.AdminID(), ((EntityObject)(ta)).EntityKey.EntitySetName.ToString(), ta.id, (int)Class.Sabitler.AdminLog.Islemler.Update);
                #endregion
            }

            RSM.ClearSelections();
            Store1.DataBind();
            TreePanel1.ReloadAsyncNode("0", null);

            WindowDuzenle.Hide();
        }
Example #15
0
        private void BindGrid()
        {
            var data = XMInstallationListService.getInstallationFinish(-1, -1, "", "", "");

            Store1.DataSource = data;
            Store1.DataBind();
        }
Example #16
0
        public void Save_Contador(object sender, EventArgs e)
        {
            DataClasses1DataContext contador = new DataClasses1DataContext();

            TContadoresAgua tcounter = new TContadoresAgua();

            try
            {
                tcounter.SerialN = (int)txtSerial.Number;
                tcounter.Marca   = txtMarca.Text;
                tcounter.Modelo  = txtModelo.Text;

                #region ADD ID VALUE
                var query = (from c in contador.TContadoresAgua
                             select c);

                List <TContadoresAgua> listaValores = query.ToList <TContadoresAgua>();
                var maxID = 0;

                if (listaValores.Count != 0)
                {
                    maxID       = listaValores.Max(x => x.Id);
                    tcounter.Id = maxID++;
                    tcounter.Id = maxID++;
                }
                else
                {
                    maxID = 1;
                }
                #endregion


                #region check Serial
                var querydupli = (from c in contador.TContadoresAgua where c.SerialN == txtSerial.Number select c);
                List <TContadoresAgua> listaValoresdupli = querydupli.ToList <TContadoresAgua>();
                #endregion


                if (listaValoresdupli.Count == 0)
                {
                    var result = contador.GetTable <TContadoresAgua>(); // get table

                    result.InsertOnSubmit(tcounter);
                    contador.SubmitChanges();
                    // Response.Write("Saved Successfully...");

                    Store1.DataBind();
                    X.Msg.Notify("Line Saved Correctly At:", DateTime.Now.ToLongTimeString()).Show();
                    FormPanel1.Reset();
                }
                else
                {
                    X.Msg.Notify("Error Saving", "Serial Number Already exists!").Show();
                }
            }
            catch (Exception ex)
            {
                throw new Exception();
            }
        }
Example #17
0
        public void DeleteRecord(string index)
        {
            try
            {
                //Step 1 Code to delete the object from the database
                PostRequest <Model.Company.Structure.Position> req = new PostRequest <Model.Company.Structure.Position>();
                Model.Company.Structure.Position p = new Model.Company.Structure.Position();
                p.recordId = index;
                req.entity = p;
                PostResponse <Model.Company.Structure.Position> resp = _branchService.ChildDelete <Model.Company.Structure.Position>(req);
                if (!resp.Success)
                {
                    X.MessageBox.ButtonText.Ok = Resources.Common.Ok;
                    Common.errorMessage(resp);
                    return;
                }
                //Step 2 :  remove the object from the store
                Store1.Remove(index);

                //Step 3 : Showing a notification for the user
                Notification.Show(new NotificationConfig
                {
                    Title = Resources.Common.Notification,
                    Icon  = Icon.Information,
                    Html  = Resources.Common.RecordDeletedSucc
                });
            }
            catch (Exception ex)
            {
                //In case of error, showing a message box to the user
                X.MessageBox.ButtonText.Ok = Resources.Common.Ok;
                X.Msg.Alert(Resources.Common.Error, Resources.Common.ErrorDeletingRecord).Show();
            }
        }
Example #18
0
    private void BindCombox()
    {
        DataFactory dal = new DataFactory();
        DataTable   dt  = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_BasicData_ComboBoxBinder_SP", new List <IFields>()
        {
            dal.CreateIFields().Append("Option", "BLCal")
            .Append("SYS", sys)
        }).GetTable();

        if (dt != null && dt.Rows.Count > 0)
        {
            Store1.DataSource = dt;
            Store1.DataBind();
        }

        DataTable dt1 = dal.FactoryDAL(PageHelper.ConnectionStrings, "FW_BasicData_ComboBoxBinder_SP", new List <IFields>()
        {
            dal.CreateIFields().Append("Option", "GetCtnrGroup")
            .Append("SYS", sys)
        }).GetTable();

        if (dt1 != null && dt1.Rows.Count > 0)
        {
            Store2.DataSource = dt1;
            Store2.DataBind();
        }
    }
Example #19
0
        protected void SecilenleriSil(object sender, EventArgs e)
        {
            if (RSM.SelectedRows.Count > 0)
            {
                for (int i = 0; i < RSM.SelectedRows.Count; i++)
                {
                    using (BaglantiCumlesi db = new BaglantiCumlesi())
                    {
                        int        PID = int.Parse(RSM.SelectedRows[i].RecordID);
                        tbl_diller ta  = (from p in db.tbl_diller where p.id == PID select p).FirstOrDefault();

                        if (!ta.ana_dil)
                        {
                            db.DeleteObject(ta);

                            #region Admin İşlem Log
                            Class.Fonksiyonlar.Admin.Log.Islemler(Class.Fonksiyonlar.Admin.Genel.AdminID(), ((EntityObject)(ta)).EntityKey.EntitySetName.ToString(), PID, (int)Class.Sabitler.AdminLog.Islemler.Delete);
                            #endregion

                            db.SaveChanges();
                        }
                    }
                }
            }

            RSM.ClearSelections();
            Store1.DataBind();
        }
Example #20
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!X.IsAjaxRequest && !IsPostBack)
            {
                SetExtLanguage();
                HideShowButtons();
                HideShowColumns();

                if (!string.IsNullOrEmpty(Request.QueryString["_employeeId"]) && !string.IsNullOrEmpty(Request.QueryString["_fromDayId"]) && !string.IsNullOrEmpty(Request.QueryString["_toDayId"]))
                {
                    dateRange1.DefaultStartDate = DateTime.ParseExact(Server.UrlDecode(Request.QueryString["_fromDayId"]).Trim('\''), "yyyyMMdd", new CultureInfo("en"));
                    dateRange1.DefaultEndDate   = DateTime.ParseExact(Server.UrlDecode(Request.QueryString["_toDayId"]).Trim('\''), "yyyyMMdd", new CultureInfo("en"));
                }
                //try
                //{
                //    AccessControlApplier.ApplyAccessControlOnPage(typeof(RT305), null, GridPanel1, null, null);
                //}
                //catch (AccessDeniedException exp)
                //{
                //    X.MessageBox.ButtonText.Ok = Resources.Common.Ok;
                //    X.Msg.Alert(Resources.Common.Error, Resources.Common.ErrorAccessDenied).Show();
                //    Viewport1.Hidden = true;
                //    return;
                //}
                if (!string.IsNullOrEmpty(Request.QueryString["_employeeId"]) && !string.IsNullOrEmpty(Request.QueryString["_fromDayId"]) && !string.IsNullOrEmpty(Request.QueryString["_toDayId"]))
                {
                    Store1.Reload();
                }

                dateRange1.DefaultStartDate = DateTime.Now.AddDays(-DateTime.Now.Day);
                FillStatus();
                timeVariationType.Select(0);
            }
        }
Example #21
0
        protected void Button1Click(object sender, DirectEventArgs e)
        {
            SpacialDataSet sd = new SpacialDataSet();

            sd.vehicule   = vehicule.Text;
            sd.dateDepart = DateTime.Parse(dateDepart.Text) + TimeSpan.Parse(HD.Text);
            sd.dateArivee = DateTime.Parse(dateArivee.Text) + TimeSpan.Parse(HA.Text);
            if (pm.Checked == true)
            {
                SqlGeometry sqlG = SqlGeometry.Parse(trajet.Text);
                sd.trajet = DbGeometry.FromBinary(sqlG.STAsBinary().Buffer);
            }
            else if (pm.Checked == false)
            {
                SqlGeometry sqlG = SqlGeometry.Parse(trajet.Text);
                sd.trajet = DbGeometry.FromBinary(sqlG.STAsBinary().Buffer);
            }
            sd.active = (bool?)SqlBoolean.Parse(active.Text);
            db        = new demoDB();
            db.SpacialDataSets.Add(sd);
            db.SaveChanges();
            X.Msg.Alert("INFO", "l'opération a été effectuée avec succès").Show();
            ResetInputs();
            Store1.Reload();
            X.Call("resetMap");
        }
Example #22
0
    private void Store1Bind()
    {
        int       depid   = common.IntSafeConvert(cmbdept.SelectedItem.Value);
        int       Month   = common.IntSafeConvert(cmbmon.SelectedItem.Value);
        DataTable dtTable = IncomeContrastpayLogic.GetICPStDTByDepID_Time(depid, Month);

        if (dtTable.Rows.Count == 0)
        {
            if (InComeSouce == null)
            {
                return;
            }
            foreach (var inComeSouce in InComeSouce)
            {
                DataRow dr = dtTable.NewRow();
                dr["InComeSouce"] = inComeSouce;
                dr["InComeMon"]   = 0;
                dr["ICPTime"]     = Convert.ToDateTime(CurrentYear + "-" + cmbmon.SelectedItem.Text + "-01");
                dr["DepID"]       = depid;
                dr["DepName"]     = cmbdept.SelectedItem.Text;
                dtTable.Rows.Add(dr);
            }
        }
        Store1.DataSource = dtTable;
        Store1.DataBind();
    }
        protected void NodeSil(object sender, DirectEventArgs e)
        {
            try
            {
                if (TreePanel1.CheckedNodes != null)
                {
                    using (BaglantiCumlesi db = new BaglantiCumlesi())
                    {
                        foreach (var i in TreePanel1.CheckedNodes)
                        {
                            int INodeID = int.Parse(i.NodeID);

                            tbl_dosyalar_kategori tbk = (from p in db.tbl_dosyalar_kategori where p.id == INodeID select p).FirstOrDefault();
                            db.DeleteObject(tbk);

                            #region Admin İşlem Log
                            Class.Fonksiyonlar.Admin.Log.Islemler(Class.Fonksiyonlar.Admin.Genel.AdminID(), ((EntityObject)(tbk)).EntityKey.EntitySetName.ToString(), INodeID, (int)Class.Sabitler.AdminLog.Islemler.Delete);
                            #endregion

                            db.SaveChanges();
                            TreePanel1.RemoveNode(i.NodeID);
                        }
                    }

                    Store1.DataBind();
                }
            }
            catch (Exception Ex)
            {
                Class.Fonksiyonlar.ExtJS.MesajKutusu(Icon.Error, MessageBox.Icon.ERROR, "İşlem başarısız", Ex.Message);
            }
        }
Example #24
0
    private void Store1Bind()
    {
        DataTable dtTable = BG_ChangePwdManager.GetAllBG_ChangePwd();

        Store1.DataSource = dtTable;
        Store1.DataBind();
    }
Example #25
0
    protected void GuncellemeYap(object sender, DirectEventArgs e)
    {
        #region Onay Boolean Çevirme
        bool   OnayBool = false;
        string CO       = Class.Fonksiyonlar.Genel.SQLTemizle(Duzenle_ComboBoxOnay.Value.ToString().Trim());
        if (CO == "1")
        {
            OnayBool = true;
        }
        #endregion

        using (BaglantiCumlesi SME = new BaglantiCumlesi())
        {
            int         PID = int.Parse(Duzenle_ID.Text.Trim());
            tbl_menuler ta  = (from p in SME.tbl_menuler where p.id == PID select p).FirstOrDefault();
            ta.dil_id       = int.Parse(Duzenle_ComboBoxDil.SelectedItem.Value.ToString());
            ta.ad           = Class.Fonksiyonlar.Genel.SQLTemizle(Duzenle_TextFieldMenu.Text.Trim());
            ta.url          = Class.Fonksiyonlar.Genel.SQLTemizle(Duzenle_ComboBoxURL.Value.ToString().Trim());
            ta.onay         = OnayBool;
            ta.admin_id_gun = Class.Fonksiyonlar.Admin.Genel.AdminID();
            SME.SaveChanges();

            #region Admin İşlem Log
            Class.Fonksiyonlar.Admin.Log.Islemler(Class.Fonksiyonlar.Admin.Genel.AdminID(), ((EntityObject)(ta)).EntityKey.EntitySetName.ToString(), ta.id, (int)Class.Sabitler.AdminLog.Islemler.Update);
            #endregion
        }

        RSM.ClearSelections();
        Store1.DataBind();

        WindowDuzenle.Hide();
    }
Example #26
0
    protected void YeniKayitYap(object sender, DirectEventArgs e)
    {
        using (BaglantiCumlesi SME = new BaglantiCumlesi())
        {
            #region Onay Boolean Çevirme
            bool   OnayBool = false;
            string CO       = Class.Fonksiyonlar.Genel.SQLTemizle(Ekle_ComboBoxOnay.Value.ToString().Trim());
            if (CO == "1")
            {
                OnayBool = true;
            }
            #endregion

            tbl_menuler ta = new tbl_menuler();
            ta.dil_id      = int.Parse(Class.Fonksiyonlar.Genel.SQLTemizle(Ekle_ComboBoxDil.Value.ToString().Trim()));
            ta.ad          = Class.Fonksiyonlar.Genel.SQLTemizle(Ekle_TextFieldMenu.Text.Trim());
            ta.url         = Class.Fonksiyonlar.Genel.SQLTemizle(Ekle_ComboBoxURL.Value.ToString().Trim());
            ta.admin_id_ek = Class.Fonksiyonlar.Admin.Genel.AdminID();
            ta.onay        = OnayBool;
            SME.AddTotbl_menuler(ta);
            SME.SaveChanges();

            #region Admin İşlem Log
            Class.Fonksiyonlar.Admin.Log.Islemler(Class.Fonksiyonlar.Admin.Genel.AdminID(), ((EntityObject)(ta)).EntityKey.EntitySetName.ToString(), ta.id, (int)Class.Sabitler.AdminLog.Islemler.Insert);
            #endregion
        }

        RSM.ClearSelections();
        Store1.DataBind();

        WindowEkle.Hide();
    }
        public void DoYes()
        {
            try
            {
                RowSelectionModel sm = this.GridPanel1.GetSelectionModel() as RowSelectionModel;

                foreach (SelectedRow row in sm.SelectedRows)
                {
                    //Step 1 :Getting the id of the selected record: it maybe string
                    int id = int.Parse(row.RecordID);


                    //Step 2 : removing the record from the store
                    //To do add code here

                    //Step 3 :  remove the record from the store
                    Store1.Remove(id);
                }
                //Showing successful notification
                Notification.Show(new NotificationConfig
                {
                    Title = Resources.Common.Notification,
                    Icon  = Icon.Information,
                    Html  = Resources.Common.ManyRecordDeletedSucc
                });
            }
            catch (Exception ex)
            {
                //Alert in case of any failure
                X.MessageBox.ButtonText.Ok = Resources.Common.Ok;
                X.Msg.Alert(Resources.Common.Error, Resources.Common.ErrorDeletingRecord).Show();
            }
        }
Example #28
0
    protected void KayitlariYenile(object sender, StoreRefreshDataEventArgs e)
    {
        if (TabloAdi != null)
        {
            #region Filtre Değişkeni
            string s = e.Parameters[GridFilters1.ParamPrefix];
            #endregion

            #region Kolon Sorting
            string Kolon = null;

            if (e.Sort != "Default")
            {
                Kolon = e.Sort;
            }
            #endregion

            #region Kolon Short Direction
            string AscDesc = null;

            if (!string.IsNullOrEmpty(e.Dir.ToString()))
            {
                AscDesc = e.Dir.ToString();
            }
            #endregion

            #region Sayfalama Başlangıcı
            int PS = e.Start;
            #endregion

            #region Sayfalama Limiti
            int PL = e.Limit;
            #endregion

            #region Toplam ve Liste Değişkenleri
            IList L1;             //İlk Sonuç
            IList L2;             //İkinci Sonuç
            #endregion

            #region Verileri Çek
            Veriler(PS, PL, s, Kolon, AscDesc, out L1, out L2);
            #endregion

            #region Toplam Kayıt Sayısı
            if (L1 != null)
            {
                e.Total = L1.Count;
            }
            #endregion

            #region Store Yükle
            if (L1 != null || L2 != null)
            {
                Store1.DataSource = L2;
                Store1.DataBind();
            }
            #endregion
        }
    }
Example #29
0
    public void OnayVer(int ID)
    {
        if (ID == -1)
        {
            if (RSM.SelectedRows.Count > 0)
            {
                for (int i = 0; i < RSM.SelectedRows.Count; i++)
                {
                    using (BaglantiCumlesi SME = new BaglantiCumlesi())
                    {
                        int        PID = int.Parse(RSM.SelectedRows[i].RecordID);
                        tbl_diller ta  = (from p in SME.tbl_diller where p.id == PID select p).FirstOrDefault();

                        if (!ta.onay)
                        {
                            ta.onay = true;
                        }

                        ta.admin_id_gun = Class.Fonksiyonlar.Admin.Genel.AdminID();

                        if (!ta.ana_dil)
                        {
                            SME.SaveChanges();
                        }

                        #region Admin İşlem Log
                        Class.Fonksiyonlar.Admin.Log.Islemler(Class.Fonksiyonlar.Admin.Genel.AdminID(), ((EntityObject)(ta)).EntityKey.EntitySetName.ToString(), ta.id, (int)Class.Sabitler.AdminLog.Islemler.Update);
                        #endregion
                    }
                }
            }
        }
        else
        {
            using (BaglantiCumlesi SME = new BaglantiCumlesi())
            {
                tbl_diller ta = (from p in SME.tbl_diller where p.id == ID select p).FirstOrDefault();

                if (!ta.onay)
                {
                    ta.onay = true;
                }

                ta.admin_id_gun = Class.Fonksiyonlar.Admin.Genel.AdminID();

                if (!ta.ana_dil)
                {
                    SME.SaveChanges();
                }

                #region Admin İşlem Log
                Class.Fonksiyonlar.Admin.Log.Islemler(Class.Fonksiyonlar.Admin.Genel.AdminID(), ((EntityObject)(ta)).EntityKey.EntitySetName.ToString(), ta.id, (int)Class.Sabitler.AdminLog.Islemler.Update);
                #endregion
            }
        }

        RSM.ClearSelections();
        Store1.DataBind();
    }
Example #30
0
        protected void GuncellemeYap(object sender, DirectEventArgs e)
        {
            #region Onay Boolean Çevirme
            bool   OnayBool = false;
            string CO       = Class.Fonksiyonlar.Genel.StringIslemleri(Class.Sabitler.StringIslemleri.StringIslemTipleri.SQLTemizle, Duzenle_ComboBoxOnay.Value.ToString().Trim());
            if (CO == "1")
            {
                OnayBool = true;
            }
            #endregion

            using (BaglantiCumlesi db = new BaglantiCumlesi())
            {
                int PID = int.Parse(Duzenle_ID.Text.Trim());
                tbl_firma_adresler ta = (from p in db.tbl_firma_adresler where p.id == PID select p).FirstOrDefault();

                if (Duzenle_TextFieldBaslik.Text != null)
                {
                    ta.baslik = Class.Fonksiyonlar.Genel.StringIslemleri(Class.Sabitler.StringIslemleri.StringIslemTipleri.SQLTemizle, Duzenle_TextFieldBaslik.Text.Trim()).ToUpper();
                }
                else
                {
                    ta.baslik = null;
                }

                ta.adres   = Class.Fonksiyonlar.Genel.StringIslemleri(Class.Sabitler.StringIslemleri.StringIslemTipleri.SQLTemizle, Duzenle_TextAreaAdres.Text.Trim());
                ta.ulke_id = int.Parse(Class.Fonksiyonlar.Genel.StringIslemleri(Class.Sabitler.StringIslemleri.StringIslemTipleri.SQLTemizle, Duzenle_ComboBoxUlke.Value.ToString().Trim()));

                if (!string.IsNullOrEmpty(Duzenle_ComboBoxBayrak.SelectedItem.Value))
                {
                    ta.ikon = Class.Fonksiyonlar.Genel.StringIslemleri(Class.Sabitler.StringIslemleri.StringIslemTipleri.SQLTemizle, Duzenle_ComboBoxBayrak.SelectedItem.Value.ToString());
                }

                if (Duzenle_TextFieldHaritaURL.Text != null)
                {
                    if (!string.IsNullOrEmpty(Class.Fonksiyonlar.Genel.StringIslemleri(Class.Sabitler.StringIslemleri.StringIslemTipleri.SQLTemizle, Duzenle_TextFieldHaritaURL.Text.Trim())))
                    {
                        ta.harita_url = Class.Fonksiyonlar.Genel.StringIslemleri(Class.Sabitler.StringIslemleri.StringIslemTipleri.SQLTemizle, Duzenle_TextFieldHaritaURL.Text.Trim());
                    }
                    else
                    {
                        ta.harita_url = null;
                    }
                }

                ta.onay         = OnayBool;
                ta.admin_id_gun = Class.Fonksiyonlar.Admin.Genel.AdminID();
                db.SaveChanges();

                #region Admin İşlem Log
                Class.Fonksiyonlar.Admin.Log.Islemler(Class.Fonksiyonlar.Admin.Genel.AdminID(), ((EntityObject)(ta)).EntityKey.EntitySetName.ToString(), ta.id, (int)Class.Sabitler.AdminLog.Islemler.Update);
                #endregion
            }

            RSM.ClearSelections();
            Store1.DataBind();

            WindowDuzenle.Hide();
        }