Exemplo n.º 1
0
 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;
     }
 }
Exemplo n.º 2
0
        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;
            }
        }