예제 #1
0
        public string DistributionPoint(int dpId, string task)
        {
            var smb = new Services.Client.SMB();
            var dp  = BLL.DistributionPoint.GetDistributionPoint(dpId);

            smb.SharePath = "//" + ParameterReplace.Between(dp.Server) + "/" + dp.ShareName;
            smb.Domain    = dp.Domain;
            if (task == "pull")
            {
                smb.Username = dp.RwUsername;
                smb.Password = new Helpers.Encryption().DecryptText(dp.RwPassword);
            }
            else
            {
                smb.Username = dp.RoUsername;
                smb.Password = new Helpers.Encryption().DecryptText(dp.RoPassword);
            }

            return(JsonConvert.SerializeObject(smb));
        }
예제 #2
0
        public string DistributionPoint(int dpId, string task)
        {
            var smb = new Services.Client.SMB();
            var dp = BLL.DistributionPoint.GetDistributionPoint(dpId);
            smb.SharePath = "//" + ParameterReplace.Between(dp.Server) + "/" + dp.ShareName;
            smb.Domain = dp.Domain;
            if (task == "pull")
            {
                smb.Username = dp.RwUsername;
                smb.Password = new Helpers.Encryption().DecryptText(dp.RwPassword);
            }
            else
            {
                smb.Username = dp.RoUsername;
                smb.Password = new Helpers.Encryption().DecryptText(dp.RoPassword);
            }
            
            return JsonConvert.SerializeObject(smb);


        }