Пример #1
0
		public void SetValues(CruiseMethodsDO obj)
		{
			if(obj == null) { return; }
			Code = obj.Code;
			FriendlyValue = obj.FriendlyValue;
		}
Пример #2
0
		public CruiseMethodsDO(CruiseMethodsDO obj) : this()
		{
		    SetValues(obj);
		}
 private void addCruiseMethod(CruiseMethodsDO fsMeth, int cnt)
 {
     switch (cnt)
      {
     case 0:
        fsMeth.Code = "100";
        fsMeth.FriendlyValue = "Classic 100%";
        break;
     case 1:
        fsMeth.Code = "STR";
        fsMeth.FriendlyValue = "Sample Tree";
        break;
     case 2:
        fsMeth.Code = "3P";
        fsMeth.FriendlyValue = "Classic 3P";
        break;
     case 3:
        fsMeth.Code = "FIX";
        fsMeth.FriendlyValue = "Fixed Plot";
        break;
     case 4:
        fsMeth.Code = "FCM";
        fsMeth.FriendlyValue = "Fixed Count/Measure";
        break;
     case 5:
        fsMeth.Code = "F3P";
        fsMeth.FriendlyValue = "Fixed 3P";
        break;
     case 6:
        fsMeth.Code = "PNT";
        fsMeth.FriendlyValue = "Point";
        break;
     case 7:
        fsMeth.Code = "PCM";
        fsMeth.FriendlyValue = "Point Count/Measure";
        break;
     case 8:
        fsMeth.Code = "P3P";
        fsMeth.FriendlyValue = "Point 3P";
        break;
     case 9:
        fsMeth.Code = "S3P";
        fsMeth.FriendlyValue = "Sample Tree with 3P subsample";
        break;
     case 10:
        fsMeth.Code = "3PPNT";
        fsMeth.FriendlyValue = "3P Point Biomass";
        break;
     case 11:
        fsMeth.Code = "FIXCNT";
        fsMeth.FriendlyValue = "Fixed Biomass (not currently available)";
        break;
      }
 }
        private void copySaleTable(DAL cDAL)
        {
            //mySale = new List<SaleDO>();
             //open sale table
             SaleDO sale = new SaleDO(cDAL.ReadSingleRow<SaleDO>("Sale", null, null));
             SaleDO fsSale = new SaleDO(fsDAL);

             fsSale.Purpose = "Timber Sale";
             fsSale.SaleNumber = sale.SaleNumber;
             fsSale.Name = sale.Name;
             fsSale.Region = sale.Region;
             fsSale.Forest = sale.Forest;
             fsSale.District = sale.District;
             fsSale.DefaultUOM = sale.DefaultUOM;
             fsSale.CalendarYear = sale.CalendarYear;
             fsSale.LogGradingEnabled = sale.LogGradingEnabled;
             fsSale.MeasurementYear = sale.MeasurementYear;
             fsSale.Remarks = sale.Remarks;

             fsSale.Save();

             logData = sale.LogGradingEnabled;

             myMeth = new List<CruiseMethodsDO>(fsDAL.Read<CruiseMethodsDO>("CruiseMethods",null,null));
             if (myMeth.Count() < 4)
             {
            myMeth.Clear();
            for (int i = 0; i < 12; i++)
            {
               CruiseMethodsDO fsMeth = new CruiseMethodsDO(fsDAL);
               addCruiseMethod(fsMeth, i);
               myMeth.Add(fsMeth);
            }
            fsDAL.Save(myMeth);
             }
        }
 public EditTemplateCruiseMethod(CruiseMethodsDO method)
 {
     this.CruiseMethod = method;
 }