public AdOperate(string filePath) { ADC = Helper.DeserializeFromXML <ADConfig>(filePath); if (ADC != null) { this.Path = ADC.DoMainPath; this.OUPath = ADC.DoMainOUPath; this.AdminUser = ADC.AdminUser; this.Password = ADC.Password; } }
public void GetADConfig(string filePath, string comName) { ADConfig adc = Helper.DeserializeFromXML <ADConfig>(filePath); if (!string.IsNullOrEmpty(comName)) { adc.DoMainPath2 = "OU=" + comName + ","; adc.SetDoMainOUPath(); } if (adc != null) { this.Path = adc.DoMainPath; this.OUPath = adc.DoMainOUPath; this.AdminUser = adc.AdminUser; this.Password = adc.Password; } }