public without sharing class ProductLimitEditController { public String accountid { get; set; } public String product_Limit { get; set; } //--------AddStart-----XHL--------------20180929------------- public String userPro_Type { get; set; } public Boolean EngFlag = false; public Boolean ETFlag = false; //--------AddEnd-----XHL--------------20180929------------- // 画面初始化 public ProductLimitEditController (){ accountid= ApexPages.currentPage().getParameters().get('accountid'); //--------AddStart-----XHL--------------20181008------------- userPro_Type= ApexPages.currentPage().getParameters().get('userPro_Type'); if(String.isBlank(userPro_Type)){ userPro_Type = 'ET'; } if(userPro_Type == 'ENG'){ EngFlag = true; }else{ ETFlag = true; } //--------AddEnd-----XHL--------------20181008------------- } public void init() { List accinfo = New List(); //--------UpdateStart-----XHL--------------20181008------------- accinfo = [SELECT Product_Limit_Date__c,Product_Limit_DateENG__c FROM Account WHERE id =:accountid]; if(accinfo.size() > 0){ if(EngFlag){ product_Limit = accinfo [0].Product_Limit_DateENG__c; }else if(ETFlag){ product_Limit = accinfo [0].Product_Limit_Date__c; } } //--------UpdateEnd-----XHL--------------20181008------------- } }