Exemplo n.º 1
0
        public void SendMsg(string codes, string module)
        {
            try
            {
                Bll_Sys_Map mapInst = new Bll_Sys_Map();
                var         Map     = mapInst.GetModel(string.Format(" AND Map_Module='{0}' AND Map_Source='{0}'", "SmsTemplate"));

                Bll_Audit auditInst  = new Bll_Audit();
                var       TemlateKey = auditInst.GetTemplateModel(module);



                string[] code = codes.TrimEnd(',').Split(',');
                foreach (var c in code)
                {
                    string content = string.Format(Map.Map_Object, TemlateKey.Template_Name, SessionConfig.UserName());

                    var model = stuffInstance.GetModelByCode(c);
                    GSMHelper.SendMessage(model.Emp_Mobile, content);
                }
            }
            catch (Exception ex)
            {
                QX.Log.PlateLog.WriteError(SessionConfig.UserName(), "", "", "", "发送短信失败!", QX.Log.PlateLog.LogMessageType.Error, ex);
            }
        }
Exemplo n.º 2
0
        private void DeleteItem()
        {
            if (selectedRow != null)
            {
                string delid = curr_session.SessionId;

                DialogResult dr = MessageBox.Show("确认删除此项吗?", "提示", MessageBoxButtons.OKCancel);
                if (dr == DialogResult.OK)
                {
                    listView.Items.Remove(selectedRow);

                    if (AppConfig.Instance.SessionConfigDict.ContainsKey(delid))
                    {
                        AppConfig.Instance.SessionConfigDict.Remove(delid);
                    }

                    if (copy_session == curr_session)
                    {
                        copy_session = null;
                    }
                    curr_session = null;

                    AppConfig.Instance.SaveConfig(2);
                }
            }
        }
Exemplo n.º 3
0
 public CustomScriptForm(SessionConfig _config, int _inx = 999999)
 {
     InitializeComponent();
     SkinUtil.SetFormSkin(this);
     config = _config;
     index  = _inx;
 }
        public ISitecoreSSCSession BuildSession()
        {
            string optionalMediaRoot      = this.OptionalMediaRoot();
            string optionalMediaExtension = this.OptionalMediaExtension();
            string optionalMediaPrefix    = this.OptionalMediaPrefix();


            ////////
            SessionConfig conf = new SessionConfig(this.instanceUrl);

            var mediaSettings = new MediaLibrarySettings(
                optionalMediaRoot,
                optionalMediaExtension,
                optionalMediaPrefix);

            var itemSource = new ItemSource(
                this.itemSourceAccumulator.Database,
                this.itemSourceAccumulator.Language,
                this.itemSourceAccumulator.VersionNumber);

            var entitySource = new EntitySource(
                this.entitySourceAccumulator.EntityNamespace,
                this.entitySourceAccumulator.EntityController,
                this.entitySourceAccumulator.EntityId,
                this.entitySourceAccumulator.EntityAction);


            var result = new ScApiSession(conf, entitySource, this.credentials, mediaSettings, itemSource);

            return(result);
        }
Exemplo n.º 5
0
        public ActionResult UploadImg(string code, string path, string module)
        {
            var list = cInstance.GetCompHisList(string.Format("AND CH_CompCode='{0}' AND CH_iType='File'", code));

            if (list.Count >= 1)
            {
                return(new JsonResult {
                    Data = new { result = "fail", Msg = "您已上传图纸图片,不能重复上传!" }
                });
            }

            string          fileName = Path.GetFileName(path);
            Bse_CompHistory comp     = new Bse_CompHistory();

            comp.CH_Code        = cInstance.GenerateHistoryCode();
            comp.CH_Date        = DateTime.Now;
            comp.CH_CompCode    = code;
            comp.CH_Auditor     = SessionConfig.UserId();
            comp.CH_AuditorName = SessionConfig.UserName();
            comp.CH_FilePath    = path;
            comp.CH_iType       = "File";
            comp.CH_Type        = "上传附件";
            cInstance.AddHis(comp);
            return(new JsonResult {
                Data = new { result = "success", Msg = "数据更新成功!" }
            });
        }
Exemplo n.º 6
0
 public ConditionTaskForm(SessionConfig seConfig, int _index)
 {
     InitializeComponent();
     SkinUtil.SetFormSkin(this);
     this.config = seConfig;
     this.index  = _index;
 }
Exemplo n.º 7
0
 /// <summary>
 /// 写入用户登录日志
 /// </summary>
 public static void LoginLog(string UserName, string Msg)
 {
     try
     {
         Bll_Sys_LoginLog instance = new Bll_Sys_LoginLog();
         Sys_LoginLog     model    = new Sys_LoginLog()
         {
             EL_Date     = DateTime.Now,
             EL_UserCode = UserName,
             EL_UserName = SessionConfig.UserName(),
             EL_IP       = HttpContext.Current.Request.UserHostAddress,
             EL_Mac      = "",
             EL_Company  = SessionConfig.Company(),
             EL_Dept     = SessionConfig.DeptName(),
             EL_Success  = Msg
         };
         instance.Insert(model);
     }
     catch (System.Exception ex)
     {
         PlateLog.WriteInFile(SessionConfig.UserId(), SessionConfig.UserName(),
                              HttpContext.Current.Request.UserHostAddress, HttpContext.Current.Request.Url.ToString(),
                              ex.Message, PlateLog.LogMessageType.Error, ex);
     }
 }
Exemplo n.º 8
0
        public void AddTableRow(SessionConfig conf)
        {
            ListViewItem viewItem = null;

            ListViewItem.ListViewSubItem subitem = null;
            if (null != conf)
            {
                viewItem            = new ListViewItem();
                viewItem.Tag        = conf;
                viewItem.Text       = conf.Name;
                viewItem.ImageIndex = 0;

                subitem      = new ListViewItem.ListViewSubItem();
                subitem.Text = conf.Host;
                viewItem.SubItems.Add(subitem);

                subitem      = new ListViewItem.ListViewSubItem();
                subitem.Text = "" + conf.Port;
                viewItem.SubItems.Add(subitem);

                subitem      = new ListViewItem.ListViewSubItem();
                subitem.Text = conf.Protocol;
                viewItem.SubItems.Add(subitem);

                subitem      = new ListViewItem.ListViewSubItem();
                subitem.Text = conf.UserName;
                viewItem.SubItems.Add(subitem);

                listView.Items.Add(viewItem);
            }
        }
Exemplo n.º 9
0
        public void OpenSshSessionWindow(SessionConfig sessionConfig)
        {
            FATabStripItem page = new FATabStripItem();

            MonitorForm form = new MonitorForm(sessionConfig);

            form.FormBorderStyle = FormBorderStyle.None;
            form.TopLevel        = false;
            form.Dock            = DockStyle.Fill;
            form.Show();

            page.Tag   = sessionConfig;
            page.Name  = "page-" + TAB_INDEX;
            page.Title = string.Format("{0} {1}", faTab.Items.Count + 1, sessionConfig.Name);
            page.Controls.Add(form);

            TAB_MONITOR.Add(page, form);

            faTab.Items.Add(page);
            faTab.SelectedItem = page;

            page.ContextMenuStrip = contextMenuStrip1;

            TAB_INDEX++;

            tsl_info1.Text = sessionConfig.Host + "@" + sessionConfig.UserName;
        }
Exemplo n.º 10
0
 protected void Page_Load(object sender, EventArgs e)
 {
     this.CurSessionConfig = new SessionConfig(0, ConfigurationManager.AppSettings["swordfish_v1_ConnectionString"]);
     if (!base.IsPostBack)
     {
         string text = Convert.ToString((int)(DateTime.Now.Year - 1));
         string str2 = Convert.ToString(DateTime.Now.Year);
         string str3 = Convert.ToString((int)(DateTime.Now.Year + 1));
         this.ddl_year.Items.Add(new ListItem(text, text));
         this.ddl_year.Items.Add(new ListItem(str2, str2));
         this.ddl_year.Items.Add(new ListItem(str3, str3));
         this.ddl_Month.Items.Add(new ListItem("1", "1"));
         this.ddl_Month.Items.Add(new ListItem("2", "2"));
         this.ddl_Month.Items.Add(new ListItem("3", "3"));
         this.ddl_Month.Items.Add(new ListItem("4", "4"));
         this.ddl_Month.Items.Add(new ListItem("5", "5"));
         this.ddl_Month.Items.Add(new ListItem("6", "6"));
         this.ddl_Month.Items.Add(new ListItem("7", "7"));
         this.ddl_Month.Items.Add(new ListItem("8", "8"));
         this.ddl_Month.Items.Add(new ListItem("9", "9"));
         this.ddl_Month.Items.Add(new ListItem("10", "10"));
         this.ddl_Month.Items.Add(new ListItem("11", "11"));
         this.ddl_Month.Items.Add(new ListItem("12", "12"));
         this.ddl_plant.Items.Add(new ListItem("320", "320"));
         this.ddl_plant.Items.Add(new ListItem("820", "820"));
         this.ddl_dchannel.Items.Add(new ListItem("3I", "3I"));
         this.ddl_dchannel.Items.Add(new ListItem("3O", "3O"));
         this.ddl_dchannel.Items.Add(new ListItem("3S", "3S"));
     }
 }
Exemplo n.º 11
0
        private void line_select_click(bool ischeck)
        {
            if (ischeck)
            {
                selectedRow  = listView.SelectedItems[0];
                curr_session = selectedRow.Tag as SessionConfig;
                ischeck      = true;
            }
            else
            {
                selectedRow  = null;
                curr_session = null;
            }

            toolSaveAll.Enabled    = ischeck;
            toolCopy.Enabled       = ischeck;
            toolDelete.Enabled     = ischeck;
            toolProperties.Enabled = ischeck;
            toolPaste.Enabled      = copy_session != null;

            connectToolStripMenuItem.Enabled    = ischeck;
            saveAllToolStripMenuItem.Enabled    = ischeck;
            copyToolStripMenuItem.Enabled       = ischeck;
            pasteToolStripMenuItem.Enabled      = copy_session != null;
            renameToolStripMenuItem.Enabled     = ischeck;
            deleteToolStripMenuItem.Enabled     = ischeck;
            propertiesToolStripMenuItem.Enabled = ischeck;

            button_conn.Enabled = ischeck;
        }
        public ISitecoreWebApiSession BuildSession()
        {
            string optionalWebApiVersion  = this.OptionalWebApiVersion();
            string optionalMediaRoot      = this.OptionalMediaRoot();
            string optionalMediaExtension = this.OptionalMediaExtension();
            string optionalMediaPrefix    = this.OptionalMediaPrefix();


            ////////
            SessionConfig conf = new SessionConfig(
                this.instanceUrl,
                this.site,
                optionalWebApiVersion);

            var mediaSettings = new MediaLibrarySettings(
                optionalMediaRoot,
                optionalMediaExtension,
                optionalMediaPrefix,
                this.resizingFlag);

            var itemSource = new ItemSource(
                this.itemSourceAccumulator.Database,
                this.itemSourceAccumulator.Language,
                this.itemSourceAccumulator.VersionNumber);

            var result = new ScApiSession(conf, this.credentials, mediaSettings, itemSource);

            return(result);
        }
Exemplo n.º 13
0
        private static Dictionary <string, string> ParseProc(string str)
        {
            Dictionary <string, string> dictionary = new Dictionary <string, string>();

            if (!string.IsNullOrEmpty(str))
            {
                string[] source = str.Split(new char[] { ';' });
                if ((source.Count <string>() <= 0) || (source.Count <string>() != 2))
                {
                    return(dictionary);
                }
                string[] strArray2 = source[0].Split(new char[] { ':' });
                string[] strArray3 = source[1].Split(new char[] { ':' });
                dictionary.Add(strArray2[0], strArray2[1]);
                if (strArray3.Count <string>() <= 0)
                {
                    return(dictionary);
                }
                Dictionary <string, string> dictionary2 = PaseProcParams(strArray3[1]);
                if (dictionary2.Count <= 0)
                {
                    return(dictionary);
                }
                foreach (KeyValuePair <string, string> pair in dictionary2)
                {
                    string str2 = pair.Value.Replace("{UserId}", SessionConfig.UserId());
                    dictionary.Add(pair.Key, str2);
                }
            }
            return(dictionary);
        }
Exemplo n.º 14
0
        /// <summary>
        /// 图纸文件上传后回调函数
        /// </summary>
        /// <param name="code"></param>
        /// <param name="path"></param>
        /// <param name="module"></param>
        /// <returns></returns>
        public ActionResult UploadDocComp(string code, string path, string type, string typename, string node, string nodename, string module)
        {
            string         fileName   = Path.GetFileName(path);
            Doc_Attachment attachment = new Doc_Attachment();

            attachment.Dat_Name    = fileName;
            attachment.Dat_Path    = path;
            attachment.Dat_Module  = module;
            attachment.Dat_RefCode = code;

            //文件类型(不同的类型不同的处理方式)
            attachment.Dat_Type        = Path.GetExtension(path).Trim('.');
            attachment.Dat_Date        = DateTime.Now;
            attachment.Dat_Creator     = SessionConfig.UserId();
            attachment.Dat_CreatorName = SessionConfig.UserName();
            attachment.Dat_Code        = diInstance.GenerateAttachmentCode();
            //图纸的类型-->全工艺 、工艺节点
            attachment.Dat_Udef1 = type;
            attachment.Dat_Udef2 = typename;
            attachment.Dat_Udef3 = node;
            attachment.Dat_Udef4 = nodename;
            diInstance.AddAttachment(attachment);

            BLL.Bll_Comm.OpLog("Upload", "Upload", string.Format("上传附件:{0}", attachment.Dat_RefCode));

            return(new JsonResult {
                Data = new { result = "success", Msg = "数据更新成功!" }
            });
        }
Exemplo n.º 15
0
 public IoHandler(SessionConfig sessionConfig, ISocketEncoder encoder, ISocketDecoder decoder, Msg heartBeatPackage)
 {
     this.sessionConfig    = sessionConfig;
     this.encoder          = encoder;
     this.decoder          = decoder;
     this.heartBeatPackage = heartBeatPackage;
 }
Exemplo n.º 16
0
 public CustomShellForm(SessionConfig _config, string name)
 {
     InitializeComponent();
     SkinUtil.SetFormSkin(this);
     config = _config;
     uuid   = name;
 }
Exemplo n.º 17
0
        /// <summary>
        /// 返回映射中的指定字段名称值
        /// </summary>
        /// <param name="hepler"></param>
        /// <param name="itype"></param>
        /// <param name="ReturnKey"></param>
        /// <returns></returns>
        public static string Comm_Map_Name(this HtmlHelper hepler, string ModuleCode, string itype, string ReturnKey)
        {
            string  name  = "";
            Sys_Map model = new Sys_Map();

            if (!string.IsNullOrEmpty(itype))
            {
                //开启Session缓存映射数据
                //if (SessionConfig.GetSession("ITYPE") == null)
                //{
                ADOSys_Map MapInstance = new ADOSys_Map();
                var        result      = MapInstance.GetAll();
                SessionConfig.SetSession("ITYPE", result);
                //}
                List <Sys_Map> list = (List <Sys_Map>)SessionConfig.GetSession("ITYPE");
                PropertyDescriptorCollection pList = TypeDescriptor.GetProperties(typeof(Sys_Map));
                var filterList = list.Where(o => o.Map_Source == itype &&
                                            o.Map_Module == ModuleCode);

                if (list != null && filterList != null && filterList.Count() > 0)
                {
                    model = filterList.FirstOrDefault();
                    name  = pList[ReturnKey] != null ? pList[ReturnKey].GetValue(model).ToString() : "";
                }
            }
            return(name);
        }
Exemplo n.º 18
0
 public NginxMappingItemForm(SessionConfig seConfig, MonitorItemConfig itemConfig)
 {
     InitializeComponent();
     SkinUtil.SetFormSkin(this);
     this.itemConfig = itemConfig;
     this.seConfig   = seConfig;
 }
Exemplo n.º 19
0
 public ActionResult Index()
 {
     if (string.IsNullOrEmpty(SessionConfig.UserId()))
     {
         return(RedirectToAction("login"));
     }
     return(View());
 }
Exemplo n.º 20
0
 public IceDeployVersionForm(AppMonitor.Froms.MonitorForm monitorForm, SessionConfig _config, IceMonitorItem ice)
 {
     InitializeComponent();
     SkinUtil.SetFormSkin(this);
     this.monitorForm = monitorForm;
     config           = _config;
     this.ice         = ice;
 }
Exemplo n.º 21
0
        private void PropertyGrid_OnPropertyValueChanged(object _sender, PropertyValueChangedEventArgs _e)
        {
            SessionConfig sessionConfig = DataContext as SessionConfig;

            Debug.Assert(sessionConfig != null);

            sessionConfig.Save();
        }
Exemplo n.º 22
0
 public SessionClient(ISessionIdGenerator sessionIdGenerator, IPartitionKeyGenerator partitionKeyGenerator, IHttpContextAccessor httpContextAccessor, SessionConfig sessionConfig, ILogger <SessionClient> logger)
 {
     this.sessionIdGenerator    = sessionIdGenerator;
     this.partitionKeyGenerator = partitionKeyGenerator;
     this.httpContextAccessor   = httpContextAccessor;
     this.sessionConfig         = sessionConfig;
     this.logger = logger;
 }
        static void Main(string[] args)
        {
            SessionConfig config  = new SessionConfig();
            ISession      session = config.OpenSession();

            using (ITransaction transaction = session.BeginTransaction())
            {
                List <Doctor> doctorList = new List <Doctor>
                {
                    new Doctor {
                        FirstName = "Michael", LastName = "Jhonson"
                    },
                    new Doctor {
                        FirstName = "Anna", LastName = "Nicolson"
                    },
                    new Doctor {
                        FirstName = "Jhon", LastName = "Travolta"
                    },
                };

                List <Pacient> pacientList = new List <Pacient>
                {
                    new Pacient {
                        FirstName = "John", LastName = "Smith"
                    },
                    new Pacient {
                        FirstName = "Ivan", LastName = "Ivanov"
                    },
                    new Pacient {
                        FirstName = "Igor", LastName = "Nikolaev"
                    },
                };

                Record record = new Record {
                    Doctor = doctorList.Last(), Pacient = pacientList.First(), Time = DateTime.Now
                };

                IRepository <Doctor> doctors = new Repository <Doctor>(session);
                doctors.Save(doctorList);

                IRepository <Pacient> pacients = new Repository <Pacient>(session);
                pacients.Save(pacientList);

                IRepository <Record> records = new Repository <Record>(session);
                records.Save(record);

                transaction.Commit();
            }

            ((List <Doctor>)(new Repository <Doctor>(session)).ReadAll()).ForEach(x => Console.WriteLine(x.LastName));
            Console.ReadLine();

            IRepository <Pacient> pacients1 = new Repository <Pacient>(session);

            ((List <Pacient>)(new Repository <Pacient>(session)).ReadAll()).ForEach(x => Console.WriteLine(x.LastName));

            Console.ReadLine();
        }
Exemplo n.º 24
0
        public ActionResult InitGrid(int page, int rows, string search, string sidx, string sord)
        {
            string ModuleCode  = Request["ModuleCode"] == null ? "" : Request["ModuleCode"].ToString();
            string NameSpace   = Request["NameSpace"] == null ? "" : Request["NameSpace"].ToString();
            string LoginId     = Request["userid"] == null ? "" : Request["userid"].ToString(); // session
            string deptid      = Request["deptid"] == null ? "" : Request["deptid"].ToString(); // session
            string filters     = Request["filters"] == null ? "" : Request["filters"].ToString();
            string Inlinetype  = Request["itype"] == null ? "0" : Request["itype"].ToString();
            string GeneralType = Request["type"] == null ? "0" : Request["type"].ToString();
            string record      = Request["record"] == null ? "" : Request["record"];
            string filtersSql  = "1=1";

            if (!string.IsNullOrEmpty(filters))
            {
                filtersSql = filters.BuildSearch(ModuleCode);
                //filtersSql = BulidJqGridSearch.BuildSearch(filters);
                //动态查询入口更改,查询结果后进行筛选
                //filtersSql = "";
            }

            //临时赋值
            LoginId = SessionConfig.UserId();
            deptid  = SessionConfig.DeptId();

            //预留两个自定义参数

            Dictionary <String, String> param = new Dictionary <string, string>();

            param.Add("@Page", page.ToString());
            param.Add("@Rows", rows.ToString());
            param.Add("@Search", filtersSql);     //查询字段
            param.Add("@Sidx", sidx);             //排序字段
            param.Add("@Sord", sord);             //排序 ASC DESC
            param.Add("@ModuleCode", ModuleCode); //模块编码
            param.Add("@NameSpace", NameSpace);   //模块命名空间
            param.Add("@Userid", LoginId);
            param.Add("@Deptid", deptid);
            param.Add("@InlineType", Inlinetype);
            param.Add("@GeneralType", GeneralType);

            //获取所有的数据列
            var dt = instance.GetListPageAllRecords(ModuleCode, NameSpace, param);

            if (!string.IsNullOrEmpty(record))
            {
                dt = FilterDataTable(dt, "Record_ID='" + record + "'");
            }
            DataTable newDt = GetPagedTable(dt, page, rows, ModuleCode);


            //newDt.DefaultView.Sort = " CreateDate DESC ";
            //DataTable newDt = DataTablePage.GetPagedTable(dt, page, rows);

            //var json = DataTablePage.JsonForJqgrid(newDt, page, rows, dt.Rows.Count);
            var json = Bll_Comm.JsonForJqgrid(ModuleCode, newDt, page, rows, dt.Rows.Count);

            return(JavaScript(json));
        }
Exemplo n.º 25
0
    public Client getClient(Msg loginPackage, OnMsgPush onMsgPush, SessionConfig sessionCfg)
    {
        Client client = ClientFactory.getInstance().get(sessionCfg, encoder, decoder, heartBeatPackage);

        client.OnMsgPush     = onMsgPush;
        client.OnLoginReturn = OnSocketLoginReturn;
        client.Acceptor      = acceptor;
        return(client);
    }
    public void Serialize(SessionConfig details)
    {
        XmlSerializer serializer = new XmlSerializer(typeof(SessionConfig));

        using (TextWriter writer = new StreamWriter(string.Format("{0}\\config.xml", Application.StartupPath)))
        {
            serializer.Serialize(writer, details);
        }
    }
Exemplo n.º 27
0
 /// <summary>
 /// index tabIndex
 /// </summary>
 /// <param name="form"></param>
 /// <param name="index"></param>
 /// <param name="_config"></param>
 /// <param name="mConfig"></param>
 public MonitorItemForm(MonitorForm form, int index, SessionConfig _config, MonitorItemConfig mConfig = null)
 {
     InitializeComponent();
     SkinUtil.SetFormSkin(this);
     parentForm    = form;
     tabIndex      = index;
     config        = _config;
     monitorConfig = mConfig;
 }
Exemplo n.º 28
0
 private void toolPaste_Click(object sender, EventArgs e)
 {
     if (null != copy_session)
     {
         SessionConfig sc = copy_session.Clone();
         AddTableRow(sc);
         AppConfig.Instance.SessionConfigDict.Add(sc.SessionId, sc);
     }
 }
Exemplo n.º 29
0
        public void TearDown()
        {
            this.sessionConfig = null;

            this.id       = null;
            this.database = null;

            this.builder = null;
        }
Exemplo n.º 30
0
        public void Setup()
        {
            this.sessionConfig = new MutableSessionConfig("http://testurl");

            this.id       = "{B0ED4777-1F5D-478D-AF47-145CCA9E4311}";
            this.database = "master";

            this.builder = new DeleteItemByIdUrlBuilder(RestServiceGrammar.ItemSSCV2Grammar(), SSCUrlParameters.ItemSSCV2UrlParameters());
        }
        static void Main(string[] args)
        {
            SessionConfig config = new SessionConfig();
            ISession session = config.OpenSession();

            using (ITransaction transaction = session.BeginTransaction())
            {
                List<Doctor> doctorList = new List<Doctor>
                {
                    new Doctor {FirstName = "Michael", LastName="Jhonson"},
                    new Doctor {FirstName = "Anna", LastName="Nicolson"},
                    new Doctor {FirstName = "Jhon", LastName="Travolta"},
                };

                List<Pacient> pacientList = new List<Pacient>
                {
                    new Pacient { FirstName = "John", LastName="Smith"},
                    new Pacient { FirstName = "Ivan", LastName="Ivanov"},
                    new Pacient { FirstName = "Igor", LastName="Nikolaev"},
                };

                Record record = new Record { Doctor = doctorList.Last(), Pacient = pacientList.First(), Time = DateTime.Now };

                IRepository<Doctor> doctors = new Repository<Doctor>(session);
                doctors.Save(doctorList);

                IRepository<Pacient> pacients = new Repository<Pacient>(session);
                pacients.Save(pacientList);

                IRepository<Record> records = new Repository<Record>(session);
                records.Save(record);

                transaction.Commit();
            }

            ((List<Doctor>)(new Repository<Doctor>(session)).ReadAll()).ForEach(x => Console.WriteLine(x.LastName));
            Console.ReadLine();

            IRepository<Pacient> pacients1 = new Repository<Pacient>(session);
            ((List<Pacient>)(new Repository<Pacient>(session)).ReadAll()).ForEach(x => Console.WriteLine(x.LastName));

            Console.ReadLine();
        }