コード例 #1
0
ファイル: ExceptionList.aspx.cs プロジェクト: BiYiTuan/soa
    protected void grid_OnCustomColumnDisplayText(object sender, ASPxGridViewColumnDisplayTextEventArgs e)
    {
        if (e.Column.FieldName != "绑定地址编码")
        {
            return;
        }

        务地址 务绑定地址 = new  务地址();

        务绑定地址.务地址编码 = new Guid(e.Value.ToString());

        if (务绑定地址.务地址编码 != Guid.Empty)
        {
            注册服务目录服务 目录服务 = new 注册服务目录服务();
            务        具体服务 = 目录服务.获得具体服务_绑定信息(务绑定地址);
            业务实体     实体   = 目录服务.获得服务提供者((Guid)具体服务.业务编码);

            if (e.Column.Caption == "调用服务")
            {
                e.DisplayText = 具体服务.务名称;
            }
            else if (e.Column.Caption == "调用系统")
            {
                e.DisplayText = 实体.描述;
            }
        }
    }
コード例 #2
0
ファイル: ScheduleList.aspx.cs プロジェクト: rebider/soa
    protected void OdsHostScheduler_Inserting(object sender, ObjectDataSourceMethodEventArgs e)
    {
        if (cbEntity.Value == null || cbService.Value == null || string.IsNullOrEmpty(txtMethodName.Text) ||
            string.IsNullOrEmpty(txtPassWord.Text) || string.IsNullOrEmpty(txtParam.Text)
            )
        {
            throw new Exception("请详细填写任务信息!");
        }


        ESB_SCHD         sched            = new ESB_SCHD();
        ESB_SCHD_EsbWS   esbWS            = new ESB_SCHD_EsbWS();
        SchedulerService schedulerService = new SchedulerService();

        string guid = Guid.NewGuid().ToString().ToUpper();

        sched.START_TIME = DateTime.Parse(e.InputParameters["START_TIME"].ToString()).ToString("yyyy-MM-dd HH:mm:ss");
        sched.END_TIME   = DateTime.Parse(e.InputParameters["END_TIME"].ToString()).ToString("yyyy-MM-dd HH:mm:ss");
        sched.SCHD_CRON  = e.InputParameters["SCHD_CRON"].ToString();
        sched.SCHD_DESC  = e.InputParameters["SCHD_DESC"].ToString();
        sched.SCHD_FREQ  = e.InputParameters["SCHD_FREQ"].ToString();
        sched.SCHD_HOST  = new Guid(e.InputParameters["SCHD_HOST"].ToString());
        sched.SCHD_NAME  = e.InputParameters["SCHD_NAME"].ToString();
        sched.SCHD_TIME  = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
        sched.SCHD_USER  = AuthUser.UserName;
        sched.TRIG_GROUP = e.InputParameters["TRIG_GROUP"].ToString();
        sched.TRIG_NAME  = "TRIG_" + sched.TRIG_GROUP + guid;
        sched.JOB_NAME   = "JOB_" + sched.TRIG_GROUP + guid;

        注册服务目录服务 目录服务   = new 注册服务目录服务();
        业务实体     entity = 目录服务.获得服务提供者(sched.SCHD_HOST);

        sched.HOST_NAME = entity.业务名称;

        esbWS.EntityID    = new Guid(cbEntity.SelectedItem.Value.ToString());
        esbWS.EntityName  = cbEntity.SelectedItem.GetValue("业务名称").ToString();
        esbWS.ServiceID   = new Guid(cbService.SelectedItem.Value.ToString());
        esbWS.ServiceName = cbService.SelectedItem.GetValue("服务名称").ToString();
        esbWS.MethodName  = txtMethodName.Text;
        esbWS.PassWord    = txtPassWord.Text;
        esbWS.ParamString = txtParam.Text;

        e.InputParameters.Clear();
        e.InputParameters["scheduler"] = sched;
        e.InputParameters["esbWS"]     = esbWS;
    }
コード例 #3
0
ファイル: ScheduleList.aspx.cs プロジェクト: vebin/soa
    protected void OdsHostScheduler_OnUpdating(object sender, ObjectDataSourceMethodEventArgs e)
    {
        if (cbEntity.Value == null || cbService.Value == null || string.IsNullOrEmpty(txtMethodName.Text)
                || string.IsNullOrEmpty(txtPassWord.Text) || string.IsNullOrEmpty(txtParam.Text)
            )
        {
            throw new Exception("请详细填写任务信息!");
        }


        ESB_SCHD sched = new ESB_SCHD();
        ESB_SCHD_EsbWS esbWS = new ESB_SCHD_EsbWS();
        SchedulerService schedulerService = new SchedulerService();

        sched.SCHD_ID = e.InputParameters["SCHD_ID"].ToString();
        sched.START_TIME = DateTime.Parse(e.InputParameters["START_TIME"].ToString()).ToString("yyyy-MM-dd HH:mm:ss");
        sched.END_TIME = DateTime.Parse(e.InputParameters["END_TIME"].ToString()).ToString("yyyy-MM-dd HH:mm:ss");
        sched.SCHD_CRON = e.InputParameters["SCHD_CRON"].ToString();
        sched.SCHD_DESC = e.InputParameters["SCHD_DESC"].ToString();
        sched.SCHD_FREQ = e.InputParameters["SCHD_FREQ"].ToString();
        sched.SCHD_HOST = new Guid(e.InputParameters["SCHD_HOST"].ToString());
        sched.SCHD_NAME = e.InputParameters["SCHD_NAME"].ToString();
        sched.SCHD_TIME = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
        sched.SCHD_USER = AuthUser.UserName;

        注册服务目录服务 目录服务 = new 注册服务目录服务();
        业务实体 entity = 目录服务.获得服务提供者(sched.SCHD_HOST);
        sched.HOST_NAME = entity.业务名称;

        esbWS.EntityID = new Guid(cbEntity.SelectedItem.Value.ToString());
        esbWS.EntityName = cbEntity.SelectedItem.GetValue("业务名称").ToString();
        esbWS.ServiceID = new Guid(cbService.SelectedItem.Value.ToString());
        esbWS.ServiceName = cbService.SelectedItem.GetValue("服务名称").ToString();
        esbWS.MethodName = txtMethodName.Text;
        esbWS.PassWord = txtPassWord.Text;
        esbWS.ParamString = txtParam.Text;

        e.InputParameters.Clear();
        e.InputParameters["scheduler"] = sched;
        e.InputParameters["esbWS"] = esbWS;
    }