Exemplo n.º 1
0
    private string getContractName(string guid)
    {
        ContractType      contractType = new ContractType();
        ContractTypeModel model        = contractType.GetModel(guid);
        string            empty        = string.Empty;

        return(model.TypeName);
    }
Exemplo n.º 2
0
    private string GetContractLimits(string ContractTypeId)
    {
        System.Collections.Generic.List <string> userCodes = new System.Collections.Generic.List <string>();
        userCodes.Add(base.UserCode);
        if (base.UserCode != "00000000")
        {
            userCodes.Add("00000000");
        }
        ContractType      contractType = new ContractType();
        ContractTypeModel model        = contractType.GetModel(ContractTypeId);

        if (model != null)
        {
            System.Collections.Generic.List <string> listFromJson = JsonHelper.GetListFromJson(model.UserCodes);
            listFromJson.ForEach(delegate(string userCode)
            {
                if (!userCodes.Contains(userCode))
                {
                    userCodes.Add(userCode);
                }
            });
        }
        string text = this.hdnProjectCode.Value.Trim();

        System.Collections.Generic.List <string> list = (System.Collections.Generic.List <string>) new PTPrjInfoZTBUserService().GetUser(text);
        list.ForEach(delegate(string userCode)
        {
            if (!userCodes.Contains(userCode))
            {
                userCodes.Add(userCode);
            }
        });
        System.Collections.Generic.List <string> userCodesByIDThroughPrjProperty = new PTPrjInfoZTBDetailService().getUserCodesByIDThroughPrjProperty(text);
        System.Collections.Generic.List <string> userCode2 = new PrivBusiDataRoleService().GetUserCode(text);
        userCodesByIDThroughPrjProperty.ForEach(delegate(string userCode)
        {
            if (!userCodes.Contains(userCode))
            {
                userCodes.Add(userCode);
            }
        });
        userCode2.ForEach(delegate(string userCode)
        {
            if (!userCodes.Contains(userCode))
            {
                userCodes.Add(userCode);
            }
        });
        return(JsonHelper.Serialize(userCodes.ToArray()));
    }