예제 #1
0
    public static bool SaveCustomerSource(int customerId, string json)
    {
        clsMyDBCommonAttrEntity objMyDBCommonEntity = new clsMyDBCommonAttrEntity();

        clsSecurityFunction.GetUserSession(ref objMyDBCommonEntity);
        CustomerEntity customerEntity = JsonConvert.DeserializeObject <CustomerEntity>(json);
        var            objAdminBAL    = new clsAdminBAL(strToolConnString, strToolConnType);
        bool           isSaved        = objAdminBAL.SaveCustomerSource(customerId, customerEntity, objMyDBCommonEntity);

        return(isSaved);
    }
예제 #2
0
    public static string GetAllCustomers()
    {
        clsMyDBCommonAttrEntity objMyDBCommonEntity = new clsMyDBCommonAttrEntity();

        clsSecurityFunction.GetUserSession(ref objMyDBCommonEntity);
        var objAdminBAL          = new clsAdminBAL(strToolConnString, strToolConnType);
        var isAddCustomerVisible = objMyDBCommonEntity.LoggedInUserRoleId == "4" ? true : false;
        var json = JsonConvert.SerializeObject(new { isAddCustomerVisible = isAddCustomerVisible, allCustomers = objAdminBAL.GetAllCustomers(objMyDBCommonEntity) });

        return(json);
    }