Пример #1
0
        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();
        }
Пример #2
0
        private void BuildTree1(Ext.Net.NodeCollection nodes)
        {
            if (nodes == null)
            {
                nodes = new Ext.Net.NodeCollection();
            }
            Ext.Net.Node root = new Ext.Net.Node();
            root.Text     = "库存管理";
            root.Expanded = true;
            nodes.Add(root);

            string[] GroupName  = { "库存表", "每日病患材料单", "领料单", "退料单", "耗材使用统计", "进货明细" };
            Icon[]   icon_array = { Icon.Book, Icon.Report, Icon.Report, Icon.Report, Icon.Report, Icon.Report };
            for (int i = 0; i < GroupName.Length; i++)
            {
                Ext.Net.Node groupNode = new Ext.Net.Node()
                {
                    Text   = GroupName[i],
                    NodeID = (i + 1).ToString(),
                    Icon   = icon_array[i],
                    Cls    = "large-font",
                    Leaf   = true
                };
                root.Children.Add(groupNode);
            }
            TreePanel1.Render();
        }
Пример #3
0
        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);
            }
        }
Пример #4
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_dosyalar_kategori ta = (from p in db.tbl_dosyalar_kategori where p.id == PID select p).FirstOrDefault();
                        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();
                        TreePanel1.RemoveNode(PID.ToString());
                    }
                }
            }

            RSM.ClearSelections();
            Store1.DataBind();
        }
Пример #5
0
        private void BuildTree1(Ext.Net.NodeCollection nodes)
        {
            if (nodes == null)
            {
                nodes = new Ext.Net.NodeCollection();
            }
            Ext.Net.Node root = new Ext.Net.Node();
            root.Text     = "血透信息";
            root.Expanded = true;
            nodes.Add(root);

            string[] GroupName = new string[7] {
                "血管通路", "透析处方", "血压测量", "透析充分性", "抗凝剂", "干体重", "合用其他透析模式"
            };
            for (int i = 0; i < GroupName.Length; i++)
            {
                Ext.Net.Node groupNode = new Ext.Net.Node()
                {
                    Text   = GroupName[i],
                    NodeID = (i + 1).ToString(),
                    Icon   = Icon.Star,
                    Cls    = "large-font",
                    Leaf   = true
                };
                root.Children.Add(groupNode);
            }
            TreePanel1.Render();
        }
        private void BuildTree1(Ext.Net.NodeCollection nodes)
        {
            if (nodes == null)
            {
                nodes = new Ext.Net.NodeCollection();
            }
            Ext.Net.Node root = new Ext.Net.Node();
            root.Text     = "设备管理";
            root.Expanded = true;
            nodes.Add(root);

            string[] GroupName  = { "人员档案", "人员肝炎指标", "人员疫苗接种", "设备档案", "设备保养纪录", "透析中心信息" };
            Icon[]   icon_array = { Icon.User, Icon.User, Icon.User, Icon.Table, Icon.TableGear, Icon.TableGear };
            for (int i = 0; i < GroupName.Length; i++)
            {
                Ext.Net.Node groupNode = new Ext.Net.Node()
                {
                    Text   = GroupName[i],
                    NodeID = (i + 1).ToString(),
                    Icon   = icon_array[i],
                    Cls    = "large-font",
                    Leaf   = true
                };
                root.Children.Add(groupNode);
            }
            TreePanel1.Render();
        }
Пример #7
0
        private void BuildTree1(Ext.Net.NodeCollection nodes)
        {
            if (nodes == null)
            {
                nodes = new Ext.Net.NodeCollection();
            }
            Ext.Net.Node root = new Ext.Net.Node();
            root.Text     = "排班选单";
            root.Expanded = true;
            nodes.Add(root);

            string[] GroupName  = { "本周排班", "双周预约排班", "双周预约排班打印", "固定排班", "排班查询" };
            Icon[]   icon_array = { Icon.User, Icon.User, Icon.Report, Icon.Table, Icon.User };
            for (int i = 0; i < GroupName.Length; i++)
            {
                Ext.Net.Node groupNode = new Ext.Net.Node()
                {
                    Text   = GroupName[i],
                    NodeID = (i + 1).ToString(),
                    Icon   = icon_array[i],
                    Cls    = "large-font",
                    Leaf   = true
                };
                root.Children.Add(groupNode);
            }
            TreePanel1.Render();
        }
Пример #8
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_dosyalar_kategori ta = (from p in db.tbl_dosyalar_kategori where p.id == PID select p).FirstOrDefault();
                        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();

                        TreePanel1.RemoveNode(PID.ToString());
                    }
                }

                Store1.DataBind();
            }
        }
Пример #9
0
        private void BuildTree1(Ext.Net.NodeCollection nodes)
        {
            if (nodes == null)
            {
                nodes = new Ext.Net.NodeCollection();
            }
            Ext.Net.Node root = new Ext.Net.Node();
            root.Text     = "处方模版";
            root.Expanded = true;
            nodes.Add(root);

            string[] GroupName = new string[3] {
                "医嘱用药模板", "血管通路用药模板", "血管通路耗材组合"
            };
            for (int i = 0; i < GroupName.Length; i++)
            {
                Ext.Net.Node groupNode = new Ext.Net.Node()
                {
                    Text   = GroupName[i],
                    NodeID = (i + 1).ToString(),
                    Icon   = Icon.Star,
                    Cls    = "large-font",
                    Leaf   = true
                };
                root.Children.Add(groupNode);
            }
            TreePanel1.Render();
        }
 /// <summary>
 ///将部门信息绑定至tree
 /// </summary>
 /// <param name="nodes"></param>
 private void BuildTree(Ext.Net.TreeNodeCollection nodes)
 {
     try
     {
         TreePanel1.RemoveAll(true);
         if (nodes == null)
         {
             nodes = new Ext.Net.TreeNodeCollection();
         }
         Ext.Net.TreeNode root = new Ext.Net.TreeNode();
         root.Text = GetLangStr("policeOffcer54", "部门列表");
         nodes.Add(root);
         root.Draggable  = true;
         root.Expandable = ThreeStateBool.True;
         root.Expanded   = true;
         DataTable dt = settingManager.GetConfigDepartment("0");
         if (dt != null)
         {
             if (dt.Rows.Count > 0)
             {
                 Addree(dt, dt.Rows[0]["col3"].ToString(), root, null);
             }
         }
     }
     catch (Exception ex)
     {
         ILog.WriteErrorLog(ex);
         logManager.InsertLogError("PoliceOfficer.aspx-BuildTree", ex.Message + ";" + ex.StackTrace, "BuildTree has an exception");
     }
 }
Пример #11
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_kategoriler ta  = (from p in SME.tbl_kategoriler where p.id == PID select p).FirstOrDefault();
            ta.dil_id       = int.Parse(Duzenle_ComboBoxDil.SelectedItem.Value.ToString());
            ta.ad           = Class.Fonksiyonlar.Genel.SQLTemizle(Duzenle_TextFieldKategori.Text.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();
        TreePanel1.ReloadAsyncNode("0", null);

        WindowDuzenle.Hide();
    }
Пример #12
0
        /// <summary>
        /// 创建部门列表树形菜单
        /// </summary>
        /// <param name="nodes"></param>
        private void BuildTree(Ext.Net.TreeNodeCollection nodes)
        {
            try
            {
                TreePanel1.RemoveAll(true);

                if (nodes == null)
                {
                    nodes = new Ext.Net.TreeNodeCollection();
                }

                Ext.Net.TreeNode root = new Ext.Net.TreeNode();

                nodes.Add(root);
                root.Draggable  = true;
                root.Expandable = ThreeStateBool.True;
                root.Expanded   = true;
                DataTable dt = Bll.Common.ChangColName(GetRedisData.GetData("t_sys_code:240050"));//把字典从400200改成240050   2016-11-17
                if (dt != null)
                {
                    if (dt.Rows.Count > 0)
                    {
                        Addree(dt, "", root, null);
                    }
                }
            }
            catch (Exception ex)
            {
                ILog.WriteErrorLog(ex);
                logManager.InsertLogError("ImportantManager.aspx-BuildTree", ex.Message + ";" + ex.StackTrace, "BuildTree has an exception");
            }
        }
Пример #13
0
        protected void KayitlariYenile(object sender, StoreRefreshDataEventArgs e)
        {
            #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();
                TreePanel1.ReloadAsyncNode("0", null);
            }
            #endregion
        }
Пример #14
0
    protected void YeniKayitYap(object sender, DirectEventArgs e)
    {
        #region Onay Boolean Çevirme
        bool   OnayBool = false;
        string CO       = Class.Fonksiyonlar.Genel.SQLTemizle(Ekle_ComboBoxOnay.Value.ToString().Trim());
        if (CO == "1")
        {
            OnayBool = true;
        }
        #endregion

        using (BaglantiCumlesi SME = new BaglantiCumlesi())
        {
            if (TreePanel1.CheckedNodes != null)
            {
                foreach (var i in TreePanel1.CheckedNodes)
                {
                    tbl_kategoriler ta = new tbl_kategoriler();
                    ta.kategori_id = int.Parse(i.NodeID);
                    ta.dil_id      = int.Parse(Class.Fonksiyonlar.Genel.SQLTemizle(Ekle_ComboBoxDil.Value.ToString().Trim()));
                    ta.ad          = Class.Fonksiyonlar.Genel.SQLTemizle(Ekle_TextFieldKategori.Text.Trim());
                    ta.onay        = OnayBool;
                    ta.admin_id_ek = Class.Fonksiyonlar.Admin.Genel.AdminID();
                    SME.AddTotbl_kategoriler(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
                }
            }
            else
            {
                tbl_kategoriler ta = new tbl_kategoriler();
                ta.kategori_id = 0;
                ta.dil_id      = int.Parse(Class.Fonksiyonlar.Genel.SQLTemizle(Ekle_ComboBoxDil.Value.ToString().Trim()));
                ta.ad          = Class.Fonksiyonlar.Genel.SQLTemizle(Ekle_TextFieldKategori.Text.Trim());
                ta.onay        = OnayBool;
                ta.admin_id_ek = Class.Fonksiyonlar.Admin.Genel.AdminID();
                SME.AddTotbl_kategoriler(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();
        TreePanel1.ReloadAsyncNode("0", null);

        WindowEkle.Hide();
    }
Пример #15
0
        protected void LoadTree(Ext.Net.NodeCollection rootNode, string userID)
        {
            if (rootNode == null)
            {
                rootNode = new Ext.Net.NodeCollection();
            }
            rolefunMgr rolefunMgr = new rolefunMgr();

            TreePanel1.GetRootNode().RemoveAll();
            TreePanel1.GetRootNode().AppendChild(rolefunMgr.GetAllFun(3, Request.Cookies["Userinfo"]["role"].ToString().Trim()));
            TreePanel1.GetRootNode().Expand(true);
        }
Пример #16
0
        private void BuildTree(Ext.Net.TreeNodeCollection nodes)
        {
            try
            {
                TreePanel1.RemoveAll(true);
                if (nodes == null)
                {
                    nodes = new Ext.Net.TreeNodeCollection();
                }

                Ext.Net.TreeNode root = new Ext.Net.TreeNode();
                root.Text = "Root";
                nodes.Add(root);
                root.Draggable  = true;
                root.Expandable = ThreeStateBool.True;
                root.Expanded   = true;
                XmlDocument xmlDoc = new XmlDocument();
                xmlDoc.Load(HttpContext.Current.Server.MapPath("MapLayerConfig.xml"));
                foreach (XmlNode plantNode in xmlDoc.SelectNodes("layers/layer"))
                {
                    Ext.Net.TreeNode Node = new Ext.Net.TreeNode();
                    Node.NodeID  = plantNode.Attributes["id"].Value;
                    Node.Text    = plantNode.Attributes["name"].Value;
                    Node.IconCls = plantNode.Attributes["icon"].Value;
                    root.Nodes.Add(Node);
                    foreach (XmlNode SubNode in plantNode.ChildNodes)
                    {
                        Ext.Net.TreeNode subNode = new Ext.Net.TreeNode();
                        subNode.Leaf    = true;
                        subNode.Checked = ThreeStateBool.False;
                        subNode.NodeID  = SubNode.Attributes["id"].Value;
                        subNode.Text    = SubNode.Attributes["name"].Value;
                        subNode.IconCls = SubNode.Attributes["icon"].Value;
                        ConfigItem ci0 = new ConfigItem("marktype", SubNode.Attributes["marktype"].Value, ParameterMode.Value);
                        subNode.CustomAttributes.Add(ci0);
                        ConfigItem ci1 = new ConfigItem("markicon", SubNode.Attributes["markicon"].Value, ParameterMode.Value);
                        subNode.CustomAttributes.Add(ci1);
                        Node.Nodes.Add(subNode);
                    }
                }
            }
            catch (Exception ex)
            {
                ILog.WriteErrorLog(ex);
                logManager.InsertLogError("BGisBrowse.aspx-BuildTree", ex.Message + ";" + ex.StackTrace, "BuildTree has an exception");
            }
        }
        public void Delete(string id, string name)
        {
            int i = serviceManager.DeleteSevice(id);

            if (i > 0)
            {
                GridDataBind(GetWhere());
                Notice(GetLangStr("policeOffcer51", "信息提示"), GetLangStr("policeOffcer59", "删除成功"));
                logManager.InsertLogRunning(uName, "删除:姓名[" + name + "]", nowIp, "3");
                BuildTree(TreePanel1.Root);
                TreePanel1.Render();
            }
            else
            {
                Notice(GetLangStr("policeOffcer51", "信息提示"), GetLangStr("policeOffcer60", "删除失败"));
            }
        }
Пример #18
0
        private void BuildTree1(Ext.Net.NodeCollection nodes)
        {
            if (nodes == null)
            {
                nodes = new Ext.Net.NodeCollection();
            }
            Ext.Net.Node root = new Ext.Net.Node();
            root.Text     = "基本资料表";
            root.Expanded = true;
            nodes.Add(root);

            if (Hospital == "Hospital_Alasamo")
            {
                string[] GroupName = { "基本资料", "病史", "体格检查", "实验室检查", "诊断", "打印", "用药纪录", "季度小结" };
                for (int i = 0; i < GroupName.Length; i++)
                {
                    Ext.Net.Node groupNode = new Ext.Net.Node()
                    {
                        Text   = GroupName[i],
                        NodeID = (i + 1).ToString(),
                        Icon   = Icon.Star,
                        Cls    = "large-font",
                        Leaf   = true
                    };
                    root.Children.Add(groupNode);
                }
            }
            else
            {
                string[] GroupName = { "基本资料", "病史", "体格检查", "实验室检查", "诊断", "打印", "用药纪录" };
                for (int i = 0; i < GroupName.Length; i++)
                {
                    Ext.Net.Node groupNode = new Ext.Net.Node()
                    {
                        Text   = GroupName[i],
                        NodeID = (i + 1).ToString(),
                        Icon   = Icon.Star,
                        Cls    = "large-font",
                        Leaf   = true
                    };
                    root.Children.Add(groupNode);
                }
            }

            TreePanel1.Render();
        }
        public void DoYes()
        {
            try
            {
                RowSelectionModel sm = this.GridDeviceManager.SelectionModel.Primary as RowSelectionModel;
                sm.SelectedRow.ToBuilder();
                string Id = sm.SelectedRow.RecordID;

                DataTable dt = deviceManager.GetDeviceInfo("device_id='" + Id + "'");
                if (dt != null)
                {
                    if (dt.Rows.Count > 0)
                    {
                        sbmc = dt.Rows[0]["DEVICE_NAME"].ToString();
                    }
                }
                if (deviceManager.DeleteDevice(Id) > 0)
                {
                    // value = Cob_SBLX.Value.ToString();

                    if (!string.IsNullOrEmpty(value))
                    {
                        LedDataBind(" 1=1 and a.device_type_id='" + value + "'");
                    }
                    else
                    {
                        LedDataBind(" 1=1");
                    }
                    logManager.InsertLogRunning(uName, GetLangStr("DeviceManager13", "删除:[") + sbmc + GetLangStr("DeviceManager15", "]设备"), nowIp, "3");
                    Notice(GetLangStr("DeviceManager70", "信息提示"), GetLangStr("DeviceManager71", "删除成功"));
                    //左边树重新加载
                    BuildTree(TreePanel1.Root);
                    TreePanel1.Render();
                }
            }
            catch (Exception ex)
            {
                ILog.WriteErrorLog(ex);
                logManager.InsertLogError("DeviceManager.aspx-DoYes", ex.Message + ";" + ex.StackTrace, "DoYes has an exception");
            }
        }
Пример #20
0
        private void BuildTree1(Ext.Net.NodeCollection nodes)
        {
            if (nodes == null)
            {
                nodes = new Ext.Net.NodeCollection();
            }
            Ext.Net.Node root = new Ext.Net.Node();
            root.Text     = "血液透析";
            root.Expanded = true;
            nodes.Add(root);

            string[] GroupName  = new string[] { "交班记录表", "血液净化记录", "净化过程明细", "血液净化记录表", "拟用药使用统计表", "血液透析患者评估表", "拟用药使用统计表" };
            Icon[]   icon_array = new Icon[] { Icon.Star, Icon.Star, Icon.Star, Icon.Star, Icon.Star, Icon.Star, Icon.Star };
            for (int i = 0; i < GroupName.Length; i++)
            {
                Ext.Net.Node groupNode = new Ext.Net.Node()
                {
                    Text   = GroupName[i],
                    NodeID = (i + 1).ToString(),
                    Icon   = icon_array[i],
                    Cls    = "large-font",
                    Leaf   = true
                };

                if (i <= 3)
                {
                    root.Children.Add(groupNode);
                }
                if (Hospital == "Hospital_Suzhou" && (i == 4 || i == 5)) //蘇州醫院專用
                {
                    root.Children.Add(groupNode);
                }
                else if (Hospital == "Hospital_Xian" && i == 6) //武警醫院專用
                {
                    root.Children.Add(groupNode);
                }
            }
            TreePanel1.Render();
        }
Пример #21
0
        private void BuildTree1(Ext.Net.NodeCollection nodes)
        {
            if (nodes == null)
            {
                nodes = new Ext.Net.NodeCollection();
            }
            Ext.Net.Node root = new Ext.Net.Node();
            root.Text     = "系統設置";
            root.Expanded = true;
            nodes.Add(root);

            string[] GroupName  = new string[] { "药品维护", "透析器型号", "血管通路维护", "管路类型", "管路型号", "权限设定维护", "病区/床号维护" };
            Icon[]   icon_array = new Icon[] { Icon.Star, Icon.Star, Icon.Star, Icon.Star, Icon.Star, Icon.Star, Icon.Star };
            for (int i = 0; i < GroupName.Length; i++)
            {
                Ext.Net.Node groupNode = new Ext.Net.Node()
                {
                    Text   = GroupName[i],
                    NodeID = (i + 1).ToString(),
                    Icon   = icon_array[i],
                    Cls    = "large-font",
                    Leaf   = true
                };
                root.Children.Add(groupNode);
            }
            if (Session["USER_RIGHT"].ToString() == "AD" && Session["USER_ID"].ToString() == "admin")
            {
                Ext.Net.Node groupNode = new Ext.Net.Node()
                {
                    Text   = " 授权管理",
                    NodeID = "8",
                    Icon   = Icon.KeyStart,
                    Cls    = "large-font",
                    Leaf   = true
                };
                root.Children.Add(groupNode);
            }
            TreePanel1.Render();
        }
Пример #22
0
 public void delecte(string id)
 {
     try
     {
         if (serviceManager.DeleteVehicles(id) > 0)
         {
             GridDataBind(GetWhere());
             BuildTree(TreePanel1.Root);
             TreePanel1.Render();
             Notice(GetLangStr("ImportantManager61", "信息提示"), GetLangStr("ImportantManager70", "删除成功"));
             UserInfo userinfo = Session["Userinfo"] as UserInfo;
             logManager.InsertLogRunning(userinfo.UserName, "" + GetLangStr("ImportantManager71", "删除:") + "" + id + Request.QueryString["type"], userinfo.NowIp, "3");
         }
         else
         {
             Notice(GetLangStr("ImportantManager61", "信息提示"), GetLangStr("ImportantManager72", "删除失败"));
         }
     }
     catch (Exception ex)
     {
         ILog.WriteErrorLog(ex);
         logManager.InsertLogError("ImportantManager.aspx-delecte", ex.Message + ";" + ex.StackTrace, "delecte has an exception");
     }
 }
        /// <summary>
        ///  更新设备信息
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void UpdateDevice(object sender, DirectEventArgs e)
        {
            try
            {
                Hashtable hs = new Hashtable();

                hs.Add("device_id", Text_SBBH.Text.ToString());
                hs.Add("device_idext", TxtDeviceIdExt.Text);
                hs.Add("device_name", Text_SBMC.Text.ToString());
                if (Cob_SBLX.SelectedIndex != -1)
                {
                    hs.Add("device_type_id", Cob_SBLX.Value.ToString());
                }
                else
                {
                    NoticeError(GetLangStr("DeviceManager67", "信息错误"), GetLangStr("DeviceManager68", "设备类型未选择"));
                    return;
                }
                if (Cob_SBXH.SelectedIndex != -1)
                {
                    hs.Add("device_mode_id", Cob_SBXH.Value.ToString());
                }
                else
                {
                    NoticeError(GetLangStr("DeviceManager67", "信息错误"), GetLangStr("DeviceManager68", "设备型号未选择"));
                    return;
                }
                hs.Add("ipaddress", Text_IP.Text.ToString());
                hs.Add("port", Text_DK.Text.ToString());
                if (!string.IsNullOrEmpty(Text_TYDS.Text))
                {
                    hs.Add("channels", Text_TYDS.Text.ToString());
                }
                else
                {
                    hs.Add("channels", "0");
                }
                hs.Add("username", Text_YHM.Text.ToString());
                hs.Add("password", Text_MM.Text.ToString());
                hs.Add("createdate", "now()");
                hs.Add("dev_length", Text_Ledth.Text.ToString());
                hs.Add("dev_width", Text_Width.Text.ToString());
                hs.Add("port_num", Text_CKH.Text.ToString());
                hs.Add("port_param", Text_CKCS.Text.ToString());
                hs.Add("protocol_id", CommonExt.IsNullComboBox(Cob_TXXY, ""));
                hs.Add("comm_type_id", CommonExt.IsNullComboBox(Cob_TXLX, ""));
                hs.Add("build_id", CommonExt.IsNullComboBox(Cob_JSDW, ""));
                hs.Add("maintain_company_id", CommonExt.IsNullComboBox(Cob_WHDW, ""));
                hs.Add("make_company_id", CommonExt.IsNullComboBox(Cob_ZZCS, ""));
                hs.Add("isuse", CommonExt.IsNullComboBox(Cob_SFSY, "1"));
                if (deviceManager.UptateDeviceInfo(hs) > 0)
                {
                    if (HidSaveFlag.Value.Equals("1"))
                    {
                        if (CheckSave.Checked)
                        {
                            Window4.Hide();
                        }
                        else
                        {
                            Text_SBMC.Reset();
                            Text_SBBH.Reset();
                            Text_IP.Reset();
                        }
                    }
                    else
                    {
                        Window4.Hide();
                    }
                    if (Cob_SBLX.SelectedIndex != -1)
                    {
                        LedDataBind(" 1=1 and a.device_type_id='" + Cob_SBLX.Value.ToString() + "'");
                    }
                    else
                    {
                        LedDataBind(" 1=1");
                    }

                    if (types == 1)
                    {
                        string sbmcs   = Text_SBMC.Text;
                        string sblxs   = Cob_SBLX.SelectedItem.Text;
                        string kksbs   = Cob_SBXH.SelectedItem.Text;
                        string sfsys   = Cob_SFSY.SelectedItem.Text;
                        string sbips   = Text_IP.Text;
                        string sbdks   = Text_DK.Text;
                        string sbtdss  = Text_TYDS.Text;
                        string wbbhs   = TxtDeviceIdExt.Text;
                        string txlxs   = Cob_TXLX.SelectedItem.Text;
                        string txxys   = Cob_TXXY.SelectedItem.Text;
                        string yhms    = Text_YHM.Text;
                        string mms     = Text_MM.Text;
                        string sbcds   = Text_Ledth.Text;
                        string sbkds   = Text_Width.Text;
                        string ckhs    = Text_CKH.Text;
                        string ckcss   = Text_CKCS.Text;
                        string jsdws   = Cob_JSDW.SelectedItem.Text;
                        string whdws   = Cob_WHDW.SelectedItem.Text;
                        string sbzzss  = Cob_ZZCS.SelectedItem.Text;
                        string lblname = "";

                        lblname += Bll.Common.AssembleRunLog(sblx, sblxs, GetLangStr("DeviceManager2", "设备类型"), "1");
                        lblname += Bll.Common.AssembleRunLog(kksb, kksbs, GetLangStr("DeviceManager71", "卡口设备"), "1");
                        lblname += Bll.Common.AssembleRunLog(sfsy, sfsys, GetLangStr("DeviceManager31", "是否使用"), "1");
                        lblname += Bll.Common.AssembleRunLog(sbip, sbips, GetLangStr("DeviceManager19", "设备Ip"), "1");
                        lblname += Bll.Common.AssembleRunLog(sbdk, sbdks, GetLangStr("DeviceManager20", "设备端口"), "1");
                        lblname += Bll.Common.AssembleRunLog(sbtds, sbtdss, GetLangStr("DeviceManager37", "设备通道数"), "1");
                        lblname += Bll.Common.AssembleRunLog(wbbh, wbbhs, GetLangStr("DeviceManager21", "外部编号"), "1");
                        lblname += Bll.Common.AssembleRunLog(txlx, txlxs, GetLangStr("DeviceManager41", "通讯类型"), "1");
                        lblname += Bll.Common.AssembleRunLog(txxy, txxys, GetLangStr("DeviceManager43", "通讯协议"), "1");
                        lblname += Bll.Common.AssembleRunLog(yhm, yhms, GetLangStr("DeviceManager45", "用户名"), "1");
                        lblname += Bll.Common.AssembleRunLog(mm, mms, GetLangStr("DeviceManager47", "密码"), "1");
                        lblname += Bll.Common.AssembleRunLog(sbcd, sbcds, GetLangStr("DeviceManager49", "设备长度"), "1");
                        lblname += Bll.Common.AssembleRunLog(sbkd, sbkds, GetLangStr("DeviceManager51", "设备宽度"), "1");
                        lblname += Bll.Common.AssembleRunLog(ckh, ckhs, GetLangStr("DeviceManager53", "串口号"), "1");
                        lblname += Bll.Common.AssembleRunLog(ckcs, ckcss, GetLangStr("DeviceManager55", "串口参数"), "1");
                        lblname += Bll.Common.AssembleRunLog(jsdw, jsdws, GetLangStr("DeviceManager58", "建设单位"), "1");
                        lblname += Bll.Common.AssembleRunLog(whdw, whdws, GetLangStr("DeviceManager60", "维护单位"), "1");
                        lblname += Bll.Common.AssembleRunLog(sbzzs, sbzzss, GetLangStr("DeviceManager62", "设备制造商"), "1");
                        logManager.InsertLogRunning(uName, GetLangStr("DeviceManager72", "修改:[") + sbmc + "]" + lblname, nowIp, "2");
                        Notice(GetLangStr("DeviceManager70", "信息提示"), GetLangStr("DeviceManager69", "信息保存成功"));
                        //页面加载方法
                        BuildTree(TreePanel1.Root);
                        TreePanel1.Render();
                        types = 0;
                    }
                    else
                    {
                        InsertLog();
                    }
                }
            }
            catch (Exception ex)
            {
                ILog.WriteErrorLog(ex);
                logManager.InsertLogError("DeviceManager.aspx-UpdateDevice", ex.Message + ";" + ex.StackTrace, "UpdateDevice has an exception");
            }
        }
Пример #24
0
 public void DM_DilDegistir()
 {
     AdminClass.DilDegistir(RSM, Store1);
     TreePanel1.ReloadAsyncNode("0", null);
 }
Пример #25
0
        /// <summary>
        /// 添加或更新重点车辆信息
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void GengXin_Click(object sender, DirectEventArgs e)
        {
            try
            {
                //储存修改前数据
                string[] updt = new string[] { uiDepartment1.DepertName, TxtHphm.Text, CmbHpzl.Value.ToString(), };

                UserInfo  userinfo = Session["userinfo"] as UserInfo;
                Hashtable hs       = new Hashtable();
                //当所属机构为空时 默认为
                if (string.IsNullOrEmpty(uiDepartment1.DepertId))
                {
                    hs.Add("GLBM", userinfo.DeptCode);
                }
                else
                {
                    hs.Add("GLBM", uiDepartment1.DepertId);
                }
                hs.Add("HPHM", VehicleHead.VehicleText + this.TxtHphm.Text.ToUpper());
                if (!string.IsNullOrEmpty(TxtClxh.Text))
                {
                    hs.Add("CLXH", this.TxtClxh.Text.ToString());
                }
                else
                {
                    hs.Add("CLXH", "");
                }
                if (!string.IsNullOrEmpty(TxtCjh.Text))
                {
                    hs.Add("CJH", this.TxtCjh.Text.ToString());
                }
                else
                {
                    hs.Add("CJH", "");
                }
                if (!string.IsNullOrEmpty(TxtFdjh.Text))
                {
                    hs.Add("FDJH", this.TxtFdjh.Text.ToString());
                }
                else
                {
                    hs.Add("FDJH", "");
                }
                if (!string.IsNullOrEmpty(TxtHdkl.Text))
                {
                    hs.Add("HDKL", this.TxtHdkl.Text.ToString());
                }
                else
                {
                    hs.Add("HDKL", "");
                }
                if (TxtSjxm.Text != "")
                {
                    hs.Add("SJXM", this.TxtSjxm.Text.ToString());
                }
                else
                {
                    hs.Add("SJXM", "");
                }
                if (!string.IsNullOrEmpty(TxtLxdh.Text))
                {
                    hs.Add("LXDH", this.TxtLxdh.Text.ToString());
                }
                else
                {
                    hs.Add("LXDH", "");
                }
                if (!string.IsNullOrEmpty(TxtSjhm.Text))
                {
                    hs.Add("SJHM", this.TxtSjhm.Text.ToString());
                }
                else
                {
                    hs.Add("SJHM", "");
                }
                if (!string.IsNullOrEmpty(TxtHjhm.Text))
                {
                    hs.Add("HJHM", this.TxtHjhm.Text.ToString());
                }
                else
                {
                    hs.Add("HJHM", "");
                }

                hs.Add("HPZL", this.CmbHpzl.Text.ToString());
                if (this.CmbClzl.SelectedIndex != -1)
                {
                    hs.Add("CLZL", this.CmbClzl.Text.ToString());
                }
                else
                {
                    hs.Add("CLZL", "");
                }
                if (this.CmbGPS.SelectedIndex != -1)
                {
                    hs.Add("GPS", this.CmbGPS.Text.ToString());
                }
                else
                {
                    hs.Add("GPS", "");
                }
                string lurutime = DateField1.SelectedDate.ToString("yyyy-MM-dd") + " 00:00:00";
                hs.Add("GZRQ", lurutime);
                if (!string.IsNullOrEmpty(TxtRyzk.Text))
                {
                    hs.Add("RYZK", this.TxtRyzk.Text.ToString());
                }
                else
                {
                    hs.Add("RYZK", "");
                }
                if (!string.IsNullOrEmpty(TxtClpp.Text))
                {
                    hs.Add("CLPP", this.TxtClpp.Text.ToString());
                }
                else
                {
                    hs.Add("CLPP", "");
                }
                if (!string.IsNullOrEmpty(TxtClzt.Text))
                {
                    hs.Add("CLZT", this.TxtClzt.Text.ToString());
                }
                else
                {
                    hs.Add("CLZT", "");
                }
                if (!string.IsNullOrEmpty(this.TimeStart.Value.ToString()))
                {
                    hs.Add("KSSJ", this.TimeStart.Value.ToString().Substring(0, 5));
                }
                else
                {
                    hs.Add("KSSJ", "");
                }

                if (!string.IsNullOrEmpty(this.TimeEnd.Value.ToString()))
                {
                    hs.Add("JSSJ", this.TimeEnd.Value.ToString().Substring(0, 5));
                }
                else
                {
                    hs.Add("JSSJ", "");
                }
                if (Session["stationlist"] != null)
                {
                    List <string> listid = Session["stationlist"] as List <string>;
                    string        kkids  = "";
                    for (int i = 0; i < listid.Count; i++)
                    {
                        kkids += (i == 0 ? "" : ",") + listid[i];
                    }
                    hs.Add("KKIDS", kkids);
                }
                else
                {
                    hs.Add("KKIDS", "");
                }
                if (Hidden1.Value.ToString() == "1")
                {
                    string ID = Math.Abs(Guid.NewGuid().ToString().GetHashCode()).ToString();
                    hs.Add("ID", ID);
                    if (serviceManager.insertVehicles(hs) > 0)
                    {
                        Window1.Hide();
                        Notice(GetLangStr("ImportantManager61", "信息提示"), GetLangStr("ImportantManager62", "添加成功"));
                        GridDataBind(GetWhere());
                        BuildTree(TreePanel1.Root);
                        TreePanel1.Render();
                        //添加记录日志
                        logManager.InsertLogRunning(userinfo.UserName, "" + GetLangStr("ImportantManager63", "添加:") + "" + ID + Request.QueryString["type"], userinfo.NowIp, "1");
                    }
                }
                if (Hidden1.Value.ToString() == "2")
                {
                    hs.Add("ID", Hidden_id.Value.ToString());
                    if (serviceManager.updateVehicles(hs) > 0)
                    {
                        Window1.Hide();
                        Notice(GetLangStr("ImportantManager61", "信息提示"), GetLangStr("ImportantManager64", "修改成功"));
                        //Ext.Net.X.Msg.Alert(GetLangStr("ImportantManager51", "信息提示"), GetLangStr("ImportantManager52", "修改成功")).Show();
                        GridDataBind(GetWhere());
                        BuildTree(TreePanel1.Root);
                        TreePanel1.Render();
                        //修改记录日志
                    }
                }
                FrmClear();
            }
            catch (Exception ex)
            {
                ILog.WriteErrorLog(ex);
                logManager.InsertLogError("ImportantManager.aspx-GengXin_Click", ex.Message + ";" + ex.StackTrace, "GengXin_Click has an exception");
            }
        }
        private Ext.Net.NodeCollection BuildTree1(Ext.Net.NodeCollection nodes)
        {
            Ext.Net.Button btnExpand = new Ext.Net.Button();
            btnExpand.Text = "展开";
            btnExpand.Listeners.Click.Handler = TreePanel1.ClientID + ".expandAll();";

            Ext.Net.Button btnCollapse = new Ext.Net.Button();
            btnCollapse.Text = "收合";
            btnCollapse.Listeners.Click.Handler = TreePanel1.ClientID + ".collapseAll();";

            Ext.Net.Button btnCount = new Ext.Net.Button();
            btnCount.Text         = "前" + iiCNT.ToString();
            btnCount.Click       += btnCount_Click;
            btnCount.Visible      = false;
            btnCount.AutoPostBack = true;

            Toolbar toolBar = new Toolbar(); //Tree Head 按鈕

            toolBar.ID = "Toolbar";
            toolBar.Items.Add(btnExpand);
            toolBar.Items.Add(btnCollapse);
            toolBar.Items.Add(btnCount);
            TreePanel1.TopBar.Add(toolBar);

            Ext.Net.Node root = new Ext.Net.Node();
            root.Text     = "PD.";
            root.NodeID   = "__";
            root.Cls      = "large-font";
            root.Expanded = true;
            //root.Expanded = false;
            nodes.Add(root);
            int iii = 0;

            // 加入人口分布節點
            dvFhir.RowFilter = "C5 like '%PD%'";
            dvFhir.Sort      = "C2 DESC";
            iii = dvFhir.Count;
            Ext.Net.Node groupNode = new Ext.Net.Node()
            {
                Text   = "人口分布 (" + iii.ToString() + ")",
                Icon   = Icon.ReportUser,
                NodeID = "PD" + "_",
                Cls    = "large-font"
            };
            root.Children.Add(groupNode);
            AddChild(groupNode, "PD", "PD", "PD", iiCNT, dvFhir.ToTable());
            groupNode.Expanded = false;
            // 加入血透年限分布節點
            dvFhir.RowFilter = "C5 like '%DDD%'";
            dvFhir.Sort      = "C2 DESC";
            iii       = dvFhir.Count;
            groupNode = new Ext.Net.Node()
            {
                Text   = "血透年限分布 (" + iii.ToString() + ")",
                Icon   = Icon.ReportUser,
                NodeID = "DDD" + "_",
                Cls    = "large-font"
            };
            root.Children.Add(groupNode);
            AddChild(groupNode, "DDD", "DDD", "DDD", iiCNT, dvFhir.ToTable());
            groupNode.Expanded = false;
            // 加入死亡率節點
            dvFhir.RowFilter = "C5 like '%MR%'";
            dvFhir.Sort      = "C2 DESC";
            iii       = dvFhir.Count;
            groupNode = new Ext.Net.Node()
            {
                Text   = "死亡率 (" + iii.ToString() + ")",
                Icon   = Icon.ReportUser,
                NodeID = "MR" + "_",
                Cls    = "large-font"
            };
            root.Children.Add(groupNode);
            AddChild(groupNode, "MR", "MR", "MR", iiCNT, dvFhir.ToTable());
            groupNode.Expanded = false;
            // 加入血透品質節點
            dvFhir.RowFilter = "C5 like '%DQ%'";
            dvFhir.Sort      = "C2 DESC";
            iii       = dvFhir.Count;
            groupNode = new Ext.Net.Node()
            {
                Text   = "血液透析品质 (" + iii.ToString() + ")",
                Icon   = Icon.ReportUser,
                NodeID = "DQ" + "_",
                Cls    = "large-font"
            };
            root.Children.Add(groupNode);
            AddChild(groupNode, "DQ", "DQ", "DQ", iiCNT, dvFhir.ToTable());
            groupNode.Expanded = false;
            // 加入医事人员節點
            dvFhir.RowFilter = "C5 like '%Practitioner%'";
            dvFhir.Sort      = "C2 DESC";
            iii       = dvFhir.Count;
            groupNode = new Ext.Net.Node()
            {
                Text   = "医事人员 (" + iii.ToString() + ")",
                Icon   = Icon.ReportUser,
                NodeID = "PR" + "_",
                Cls    = "large-font"
            };
            root.Children.Add(groupNode);
            //AddChild(groupNode, "PR", "PR", "PR", dtPractitioner.Columns.Count, dtPractitioner);
            AddChild(groupNode, "PR", "PR", "PR", iiCNT, dvFhir.ToTable());
            groupNode.Expanded = false;
            // 加入病患基本数据節點
            dvFhir.RowFilter = "C5 like '%Patient%'";
            dvFhir.Sort      = "C2 DESC";
            iii       = dvFhir.Count;
            groupNode = new Ext.Net.Node()
            {
                Text   = "病患基本数据 (" + iii.ToString() + ")",
                Icon   = Icon.ReportUser,
                NodeID = "PI" + "_",
                Cls    = "large-font"
            };
            root.Children.Add(groupNode);
            //AddChild(groupNode, "PI", "PI", "PI", dtPatient.Columns.Count, dtPatient);
            AddChild(groupNode, "PI", "PI", "PI", iiCNT, dvFhir.ToTable());
            groupNode.Expanded = false;
            // 加入医嘱用药節點
            dvFhir.RowFilter = "C5 like '%Medication%'";
            dvFhir.Sort      = "C2 DESC";
            iii       = dvFhir.Count;
            groupNode = new Ext.Net.Node()
            {
                Text   = "医嘱用药 (" + iii.ToString() + ")",
                Icon   = Icon.ReportUser,
                NodeID = "MO" + "_",
                Cls    = "large-font"
            };
            root.Children.Add(groupNode);
            //AddChild(groupNode, "PI", "PI", "PI", dtPatient.Columns.Count, dtPatient);
            AddChild(groupNode, "MO", "MO", "MO", iiCNT, dvFhir.ToTable());
            groupNode.Expanded = false;
            //--------------------
            TreePanel1.Render();
            TreePanel1.Expand(false);
            return(nodes);
        }
Пример #27
0
 public void DilDegistir()
 {
     RSM.ClearSelections();
     Store1.DataBind();
     TreePanel1.ReloadAsyncNode("0", null);
 }
Пример #28
0
        protected void YeniKayitYap(object sender, DirectEventArgs e)
        {
            using (BaglantiCumlesi db = new BaglantiCumlesi())
            {
                if (TreePanel1.CheckedNodes != null)
                {
                    foreach (var i in TreePanel1.CheckedNodes)
                    {
                        tbl_dosyalar_kategori ta = new tbl_dosyalar_kategori();
                        ta.tip         = (int)Class.Sabitler.Dosya.Video;
                        ta.kategori_id = int.Parse(i.NodeID);
                        ta.ad          = Class.Fonksiyonlar.Genel.StringIslemleri(Class.Sabitler.StringIslemleri.StringIslemTipleri.SQLTemizle, Ekle_TextFieldKategori.Text.Trim());

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

                        ta.admin_id_ek = Class.Fonksiyonlar.Admin.Genel.AdminID();
                        db.AddTotbl_dosyalar_kategori(ta);
                        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.Insert);
                        #endregion
                    }
                }
                else
                {
                    tbl_dosyalar_kategori ta = new tbl_dosyalar_kategori();
                    ta.kategori_id = 0;
                    ta.tip         = (int)Class.Sabitler.Dosya.Video;
                    ta.ad          = Class.Fonksiyonlar.Genel.StringIslemleri(Class.Sabitler.StringIslemleri.StringIslemTipleri.SQLTemizle, Ekle_TextFieldKategori.Text.Trim());

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

                    ta.admin_id_ek = Class.Fonksiyonlar.Admin.Genel.AdminID();
                    db.AddTotbl_dosyalar_kategori(ta);
                    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.Insert);
                    #endregion
                }
            }

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

            WindowEkle.Hide();
        }
        /// <summary>
        ///更新事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void GengXin_Click(object sender, DirectEventArgs e)
        {
            try
            {
                string    ID = Guid.NewGuid().ToString();
                Hashtable hs = new Hashtable();
                //当没选择所属单位的时候  默认为371600000000 必须要DEPARTID
                if (string.IsNullOrEmpty(uiDepartment1.DepertId))
                {
                    hs.Add("DEPARTID", "371600000000");
                }
                else
                {
                    hs.Add("DEPARTID", uiDepartment1.DepertId);
                }

                hs.Add("NAME", this.TxtName.Text.ToString());

                //警号
                if (TxtSiren.Text != "")
                {
                    //  if(TxtSiren.Text== ){
                    hs.Add("SIREN", this.TxtSiren.Text.ToString());
                    //}
                }
                else
                {
                    hs.Add("SIREN", "");
                }
                if (this.CmbRanks.SelectedIndex != -1)
                {
                    hs.Add("RANKS", this.CmbRanks.Text.ToString());
                }
                else
                {
                    hs.Add("RANKS", "");
                }
                if (this.CmbDuty.SelectedIndex != -1)
                {
                    hs.Add("PROFESSION", this.CmbDuty.Text.ToString());
                }
                else
                {
                    hs.Add("PROFESSION", "");
                }
                if (this.CmbFormat.SelectedIndex != -1)
                {
                    hs.Add("PREPARATIONTYPE", this.CmbFormat.Text.ToString());
                }
                else
                {
                    hs.Add("PREPARATIONTYPE", "");
                }
                if (this.CmbTeQin.SelectedIndex != -1)
                {
                    hs.Add("SECRETLEVEL", this.CmbTeQin.Text.ToString());
                }
                else
                {
                    hs.Add("SECRETLEVEL", "");
                }
                hs.Add("PHONE", this.TxtPhone.Text.ToString());
                if (TxtHandSets.Text != "")
                {
                    hs.Add("HANDSETS", this.TxtHandSets.Text.ToString());
                }
                else
                {
                    hs.Add("HANDSETS", "");
                }
                if (TxtOfficePhone.Text != "")
                {
                    hs.Add("OFFICEPHONE", this.TxtOfficePhone.Text.ToString());
                }
                else
                {
                    hs.Add("OFFICEPHONE", "");
                }
                if (TxtHandSetsCode.Text != "")
                {
                    hs.Add("HANDSETSCODE", this.TxtHandSetsCode.Text.ToString());
                }
                else
                {
                    hs.Add("HANDSETSCODE", "");
                }

                if (TxtHandSetsGroup.Text != "")
                {
                    hs.Add("HANDSETSGROUP", this.TxtHandSetsGroup.Text.ToString());
                }
                else
                {
                    hs.Add("HANDSETSGROUP", "");
                }

                if (this.CmbMale.SelectedIndex != -1)
                {
                    hs.Add("SEX", this.CmbMale.Text.ToString());
                }
                else
                {
                    hs.Add("SEX", "");
                }
                if (TxtAddress.Text != "")
                {
                    hs.Add("ADDRESS", this.TxtAddress.Text.ToString());
                }
                else
                {
                    hs.Add("ADDRESS", "");
                }
                string lurutime = DateField1.SelectedDate.ToString("yyyy-MM-dd") + " 00:00:00";
                hs.Add("BIRTHDAY", lurutime);
                if (TxtEqip.Text != "")
                {
                    hs.Add("POLICEEQUIPMENT", TxtEqip.Text.ToString());
                }
                else
                {
                    hs.Add("POLICEEQUIPMENT", "");
                }

                if (TxtIdNo.Text != "")
                {
                    hs.Add("IDNO", TxtIdNo.Text.ToString());
                }
                else
                {
                    hs.Add("IDNO", "");
                }
                DataTable dt = Session["datatable"] as DataTable;

                if (Hidden1.Value.ToString() == "1")
                {
                    DataRow[] rows = dt.Select("col9 ='" + TxtSiren.Text.ToString() + "'");
                    if (rows.Length > 0)
                    {
                        Notice(GetLangStr("policeOffcer51", "信息提示"), GetLangStr("PoliceOfficer52", "警号重复"));
                        return;
                    }
                    hs.Add("USERCODE", serviceManager.GetRecordID());
                    if (serviceManager.insertSevice(hs) > 0)
                    {
                        Window1.Hide();
                        Notice(GetLangStr("policeOffcer51", "信息提示"), GetLangStr("policeOffcer53", "添加成功"));
                        lblname = "";

                        lblname += Bll.Common.AssembleRunLog("", TxtName.Text, GetLangStr("PoliceOfficer18", "姓名"), "0");
                        lblname += Bll.Common.AssembleRunLog("", xbie, GetLangStr("PoliceOfficer19", "性别"), "0");
                        lblname += Bll.Common.AssembleRunLog("", TxtSiren.Text, GetLangStr("PoliceOfficer20", "警号"), "0");
                        logManager.InsertLogRunning(uName, GetLangStr("PoliceOfficer50", "添加") + lblname, nowIp, "1");

                        GridDataBind(GetWhere());
                        BuildTree(TreePanel1.Root);
                        TreePanel1.Render();
                    }
                    else
                    {
                        Notice(GetLangStr("policeOffcer51", "信息提示"), GetLangStr("policeOffcer53", "添加失败"));
                    }
                }
                if (Hidden1.Value.ToString() == "2")
                {
                    DataRow[] rows = dt.Select("col9 ='" + TxtSiren.Text.ToString() + "'");
                    if (rows.Length > 1)
                    {
                        Notice(GetLangStr("policeOffcer51", "信息提示"), GetLangStr("PoliceOfficer52", "警号重复"));
                        return;
                    }
                    hs.Add("USERCODE", Hidden_id.Value.ToString());
                    if (serviceManager.updateSevice(hs) > 0)
                    {
                        Window1.Hide();
                        Notice(GetLangStr("policeOffcer51", "信息提示"), GetLangStr("policeOffcer22", "修改成功"));


                        string sw1  = uiDepartment1.DepertName; // 所属单位
                        string xb1  = CmbMale.Text;             //性别
                        string xm1  = TxtName.Text;             //姓名
                        string cq1  = DateField1.Text;          //出生日期
                        string jz1  = TxtAddress.Text;          //家庭住址
                        string sh1  = TxtIdNo.Text;             //身份证号
                        string jh1  = TxtSiren.Text;            //警号
                        string jx1  = CmbRanks.Text;            //警衔
                        string xw1  = CmbDuty.Text;             //现职务
                        string bb1  = CmbFormat.Text;           //编制类别
                        string tb1  = CmbTeQin.Text;            //特勤类别
                        string sj1  = TxtPhone.Text;            //手机
                        string bh1  = TxtOfficePhone.Text;      //办公电话
                        string st1  = TxtHandSets.Text;         //手台
                        string sth1 = TxtHandSetsCode.Text;     //手台呼号
                        string szh1 = TxtHandSetsGroup.Text;    ///手台组号
                        string jb1  = TxtEqip.Text;             //警用装备
                        this.Hidden_name.Value = xm1;
                        lblname  = "";
                        lblname += Bll.Common.AssembleRunLog(sw, sw1, GetLangStr("PoliceOfficer26", "所属单位"), "0");
                        lblname += Bll.Common.AssembleRunLog(xm, xm1, GetLangStr("PoliceOfficer29", "姓名"), "0");
                        lblname += Bll.Common.AssembleRunLog(cq, cq1, GetLangStr("PoliceOfficer30", "出生日期"), "0");
                        lblname += Bll.Common.AssembleRunLog(jz, jz1, GetLangStr("PoliceOfficer31", "家庭住址"), "0");
                        lblname += Bll.Common.AssembleRunLog(sh, sh1, GetLangStr("PoliceOfficer32", "身份证号"), "0");
                        lblname += Bll.Common.AssembleRunLog(jh, jh1, GetLangStr("PoliceOfficer33", "警号"), "0");
                        lblname += Bll.Common.AssembleRunLog(jx, jx1, GetLangStr("PoliceOfficer34", "警衔"), "0");
                        lblname += Bll.Common.AssembleRunLog(xw, xw1, GetLangStr("PoliceOfficer36", "现职务"), "0");
                        lblname += Bll.Common.AssembleRunLog(bb, bb1, GetLangStr("PoliceOfficer38", "编制类别"), "0");
                        lblname += Bll.Common.AssembleRunLog(tb, tb1, GetLangStr("PoliceOfficer40", "特勤级别"), "0");
                        lblname += Bll.Common.AssembleRunLog(sj, sj1, GetLangStr("PoliceOfficer42", "手机"), "0");
                        lblname += Bll.Common.AssembleRunLog(bh, bh1, GetLangStr("PoliceOfficer43", "办公电话"), "0");
                        lblname += Bll.Common.AssembleRunLog(st, st1, GetLangStr("PoliceOfficer44", "手台"), "0");
                        lblname += Bll.Common.AssembleRunLog(sth, sth1, GetLangStr("PoliceOfficer45", "手台呼号"), "0");
                        lblname += Bll.Common.AssembleRunLog(szh, szh1, GetLangStr("PoliceOfficer46", "手台组号"), "0");
                        lblname += Bll.Common.AssembleRunLog(jb, jb1, GetLangStr("PoliceOfficer47", "警用装备"), "0");
                        if (!xb.Equals(xb1))
                        {
                            if (Convert.ToInt32(xb1) == 0)
                            {
                                xb1 = GetLangStr("PoliceOfficer37", "女");
                                // return;
                            }
                            if (Convert.ToInt32(xb1) == 1)
                            {
                                xb1 = GetLangStr("PoliceOfficer39", "男");
                                //return;
                            }
                            if (Convert.ToInt32(xb1) == 2)
                            {
                                xb1 = GetLangStr("PoliceOfficer61", "自定义");
                                //return;
                            }
                            lblname += GetLangStr("PoliceOfficer27", ";性别:") + xb1;
                        }
                        logManager.InsertLogRunning(uName, GetLangStr("PoliceOfficer13", "修改[") + xm1 + GetLangStr("PoliceOfficer62", "]用户:") + lblname, nowIp, "1");
                        GridDataBind(GetWhere());
                        BuildTree(TreePanel1.Root);
                        TreePanel1.Render();
                    }
                    else
                    {
                        Notice(GetLangStr("policeOffcer51", "信息提示"), GetLangStr("policeOffcer52", "修改失败"));
                    }
                }
                FrmClear();
            }
            catch (Exception ex)
            {
                ILog.WriteErrorLog(ex);
                logManager.InsertLogError("PoliceOfficer.aspx-GengXin_Click", ex.Message + ";" + ex.StackTrace, "GengXin_Click has an exception");
            }
        }