using BP.En;
namespace BP.GPM.DTalk.DTS
{
///
/// 钉钉人员头像同步
///
public class OrgInit_DingUserIcon : Method
{
///
/// 钉钉人员头像同步
///
public OrgInit_DingUserIcon()
{
this.Title = "钉钉人员头像同步到DataUser/Icon";
this.Help = "本功能将钉钉企业号中所有人员的头像下载到本地,包括一张大图,一张小图";
}
///
/// 设置执行变量
///
///
public override void Init()
{
}
///
/// 当前的操纵员是否可以执行这个方法
///
public override bool IsCanDo
{
get
{
if (BP.WF.Glo.IsEnable_DingDing == true)
return true;
return false;
}
}
///
/// 执行
///
/// 返回执行结果
public override object Do()
{
DingDing ding = new DingDing();
string savePath = BP.Difference.SystemConfig.PathOfDataUser + "UserIcon";
bool result = ding.DownLoadUserIcon(savePath);
if (result == true)
return "执行成功...";
else
return "执行失败...";
}
}
}