示例#1
0
 private void AddZm()
 {
     if (this.Parent == null)
     {
         return;
     }
     //if (this.Activitie == null) return;
     if (this.SubheadingsList.Count < 1)
     {
         _SubheadingsInfo info = new _FSubheadingsInfo();
         info.XMBM        = "补" + this.OLDXMBM.Replace("补", "");
         info.OLDXMBM     = this.OLDXMBM.Replace("补", "");
         info.XMMC        = "补充定额";
         info.GCL         = 1m;
         info.SC          = true;
         info.LB          = "子目";
         info.DW          = this.DW;
         info.TX          = this.Activitie.ProType.Replace("【", "").Replace("】", "").Substring(0, 2);
         info.LibraryName = this.Activitie.Property.Libraries.FixedLibrary.FullName;
         this.Create(info);
         this.Activitie.Property.SubSegments.ChangeSource();
         // this.Activitie.Property.SubSegments.DataSource.ResetBindings(false);
         // this.Activitie.Property.SubSegments.DataSource.ResetBindings(false);
     }
 }
示例#2
0
 public virtual void Create(string m_DEH, int d)
 {
     DataRow[] rows = this.Activitie.Property.Libraries.FixedLibrary.LibraryDataSet.Tables["定额表"].Copy().Select(string.Format("DINGEH='{0}'", m_DEH));
     if (rows.Length > 0)
     {
         _SubheadingsInfo sinfo = new _FSubheadingsInfo();
         this.Activitie.Property.SubSegments.Methods.SetSubheadingsInfo(sinfo, rows[0], this.Activitie.Property.Libraries.FixedLibrary.FullName);
         //view1.BEIZHU = (view1 as _SubheadingsInfo).Parent.OLDXMBM + "D" + DateTime.Now.ToString("yyyyMMddHHmmss");
         sinfo.XMBM += " *" + d + "";
         this.Create(sinfo);
     }
 }