Exemple #1
0
        private void ChuangjianDingjiMulu(string mingcheng, string chuangjianren)
        {
            lock (_lock)
            {
                MuluDataModel model = new MuluDataModel();
                model.Chuangjianren = chuangjianren;
                model.ChuangjianShijian = DateTime.Now;
                model.Mingcheng = mingcheng;
                int id = (int)NHibernateHelper.CurrentSession.Save(model);

                Mulu mulu = new DingjiMulu(id, mingcheng, chuangjianren, model.ChuangjianShijian, null, null, null,null);
                List<Mulu> muluList = this._muluList.ToList();
                muluList.Add(mulu);
                this._muluList = muluList;
                this.DingjiMulu = mulu;
                this.BangdingMuluShijian(mulu);
            }
        }
Exemple #2
0
        public Mulu ChuangjianMulu(string mingcheng, string chuangjianren)
        {
            lock (_lock)
            {
                var model = new MuluDataModel();
                model.Chuangjianren = chuangjianren;
                model.ChuangjianShijian = DateTime.Now;
                model.FuMulu = Id;
                model.Mingcheng = mingcheng;
                var id = (int) NHibernateHelper.CurrentSession.Save(model);

                var mulu = new Mulu(id, mingcheng, chuangjianren, model.ChuangjianShijian, null, null, null, null);
                mulu.FuMulu = this;
                mulu.ShanchuHou += ZiMulu_ShanchuHou;
                List<Mulu> muluList = _ziMuluList.ToList();
                muluList.Add(mulu);
                _ziMuluList = muluList;

                if (ChuangjianZiMuluHou != null)
                {
                    ChuangjianZiMuluHou(this, mulu);
                }
                return mulu;
            }
        }
Exemple #3
0
 private Mulu JiazaiMulu(MuluDataModel model)
 {
     Mulu mulu = this.GetMulu(model.Id);
     if (mulu == null)
     {
         List<Mulu> ziMuluList = this.JiazaiZiMulu(model.Id);
         List<Quanxian> quanxianList = this.JiazaiQuanxian(model.Id);
         List<DaanGuanliQuanxian> daanGuanliQuanxianList = this.JiazaiDaanGuanliQuanxian(model.Id);
         List<Zhishi> zhishiList = this.JiazaiZhishi(model.Id);
         if (model.FuMulu == 0)
         {
             mulu = new DingjiMulu(model.Id, model.Mingcheng, model.Chuangjianren, model.ChuangjianShijian, quanxianList, ziMuluList, zhishiList, daanGuanliQuanxianList);
         }
         else
         {
             mulu = new Mulu(model.Id, model.Mingcheng, model.Chuangjianren, model.ChuangjianShijian, quanxianList, ziMuluList, zhishiList, daanGuanliQuanxianList);
         }
         this._muluList.Add(mulu);
         this.BangdingMuluShijian(mulu);
     }
     return mulu;
 }